diff --git a/swh/journal/publisher.py b/swh/journal/publisher.py --- a/swh/journal/publisher.py +++ b/swh/journal/publisher.py @@ -29,13 +29,14 @@ DEFAULT_CONFIG = { 'brokers': ('list[str]', ['getty.internal.softwareheritage.org']), - 'temporary_prefix': ('str', 'swh.tmp_journal.new'), + 'temporary_prefix': ('str', 'swh.tmp_journal'), 'final_prefix': ('str', 'swh.journal.objects'), 'consumer_id': ('str', 'swh.journal.publisher'), 'publisher_id': ('str', 'swh.journal.publisher'), 'object_types': ('list[str]', ['content', 'revision', 'release']), + 'mutable_object_types': ('list[str]', []), 'storage': ('dict', { 'cls': 'remote', @@ -82,9 +83,13 @@ logging.debug('Subscribing to object types event: %s' % ( config['object_types'], )) self.consumer.subscribe( - topics=['%s.%s' % (config['temporary_prefix'], object_type) + topics=['%s.new.%s' % (config['temporary_prefix'], object_type) for object_type in config['object_types']], ) + self.consumer.subscribe( + topics=['%s.changed.%s' % (config['temporary_prefix'], object_type) + for object_type in config['mutable_object_types']], + ) def _prepare_storage(self, config): """Prepare the storage instance needed for the publisher to be able to