Closed rnowling-memphis closed 1 year ago
If using a callback, the consumer name is set to the consumer group:
consumer_group = get_internal_name(self.consumer_group) self.psub = await self.connection.broker_connection.pull_subscribe( subject + ".final", durable=consumer_group )
If using the fetch() method, the consumer name is set to the consumer group (if provided) or the consumer name:
if self.consumer_group != "": durable_name = get_internal_name(self.consumer_group) else: durable_name = get_internal_name(self.consumer_name) subject = get_internal_name(self.station_name) self.psub = await self.connection.broker_connection.pull_subscribe( subject + ".final", durable=durable_name )
And then the DLQ consumer does something completely differently:
subscription_name = "$memphis_dls_" + subject + "_" + consumer_group self.consumer_dls = await self.connection.broker_manager.subscribe( subscription_name, subscription_name )
It makes sense to me that if a consumer group isn't provided, then we use the consumer name as the consumer group. It's not clear to me, however, where we should be passing the consumer group.
This has to do with differences in how normal messages versus dead letter messages are handled internally. This is expected behavior.
If using a callback, the consumer name is set to the consumer group:
If using the fetch() method, the consumer name is set to the consumer group (if provided) or the consumer name:
And then the DLQ consumer does something completely differently:
It makes sense to me that if a consumer group isn't provided, then we use the consumer name as the consumer group. It's not clear to me, however, where we should be passing the consumer group.