Publisher confirms: Different types of correlation data on same queue?

42 views
Skip to first unread message

Martin Schröder

unread,
Jan 19, 2023, 9:12:42 AM1/19/23
to rabbitm...@googlegroups.com
rabbitmq 3.7.7, erlang 20.3

Hi,
we have a system developed with Spring/Spring Boot.
We are using classic mirrored queues with publisher confirms
and callback listeners.

Now we want to create a new service that would send data
into a queue already used by another application, but with
a different type of correlation data.

Can we use different types of correlation data on the same queue
without confusing the listeners, i.e. will the callback listeners of
each sender only get the correlation data it sends?

Thanks in advance
Martin

PS: I know, outdated rabbitmq and old queues.
Update is in the back log.

Gary Russell

unread,
Jan 19, 2023, 9:55:40 AM1/19/23
to rabbitm...@googlegroups.com
Please ask questions about Spring on Stack Overflow, not here.

The correlation data used by the publisher confirm mechanism has nothing to do with anything sent in the message itself by the producer. It has no bearing on consumers at all.

When you send a message you provide some correlation data; Spring stores that in memory, keyed by the channel's nextPublishSeqNo​. When the confirm is received for that sequence, we look up the correlation data, we complete its Future<?>​ and send it to the callback - so the application can tell which send this confirmation is for.


From: rabbitm...@googlegroups.com <rabbitm...@googlegroups.com> on behalf of Martin Schröder <mar...@oneiros.de>
Sent: Thursday, January 19, 2023 9:12 AM
To: rabbitm...@googlegroups.com <rabbitm...@googlegroups.com>
Subject: [rabbitmq-users] Publisher confirms: Different types of correlation data on same queue?
 
!! External Email
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Frabbitmq-users%2FCAP7DCDe8RcY0BaHmGgk%252BBFPp2ZeROkd7jnXDpNAwgcp4CDTb%252Bw%2540mail.gmail.com&data=05%7C01%7Cgrussell%40vmware.com%7C47023f5cc0654c97206d08dafa27386d%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638097343625060534%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=S2rbkQOBBoSfZSZ7NKvK3DLd7o44%2BhX62Wu9bozeSQk%3D&reserved=0.

!! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.

Martin Schröder

unread,
Jan 19, 2023, 10:02:32 AM1/19/23
to rabbitm...@googlegroups.com
Am Do., 19. Jan. 2023 um 15:55 Uhr schrieb 'Gary Russell' via
rabbitmq-users <rabbitm...@googlegroups.com>:
> When you send a message you provide some correlation data; Spring stores that in memory, keyed by the channel's nextPublishSeqNo. When the confirm is received for that sequence, we look up the correlation data, we complete its Future<?> and send it to the callback - so the application can tell which send this confirmation is for.

So yes, what I want will work, since the correlation data doesn't
leave the application.

Thanks
Martin
Reply all
Reply to author
Forward
0 new messages