declare exchange in rabbitmq

26 views
Skip to first unread message

אורית חזן

unread,
Nov 5, 2020, 7:45:31 AM11/5/20
to masstransit-discuss

Hi

I have a Nodejs consumer that needs to receive published messages from Mass transit

I want that mass transit will create the exchange for me and node will create the queue for itself

 locking for a way to declare on exchange without any consumer 

how do I accomplish it?

 

Thanks ! 

Chris Patterson

unread,
Nov 5, 2020, 8:00:33 AM11/5/20
to masstrans...@googlegroups.com
When you call GetSendEndpoint (on either IBus, or on ConsumeContext), specify exchange:name as the address. MassTransit will create the exchange prior to sending the message.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/b370bfc9-f4b9-43d9-8544-7e88cbd68f5bn%40googlegroups.com.

אורית חזן

unread,
Nov 5, 2020, 10:28:03 AM11/5/20
to masstrans...@googlegroups.com
it's still creating the exchange only when I actually send the message... 
this line: var endpoint = await sendEndpointProvider.GetSendEndpoint(destinationUri);
not doing anything in rabbitmq.
Maybe I didn't understand you well? 

‫בתאריך יום ה׳, 5 בנוב׳ 2020 ב-15:00 מאת ‪Chris Patterson‬‏ <‪ch...@phatboyg.com‬‏>:‬
You received this message because you are subscribed to a topic in the Google Groups "masstransit-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/masstransit-discuss/YEZ37Afb5iA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/CAHX4WYeuJPCWN5HVfU5LuOc4hT2C%2BLOH%2Bkn%3D%3DJcsdw_chunJmw%40mail.gmail.com.

Eric Piraux

unread,
Nov 5, 2020, 11:05:48 AM11/5/20
to masstrans...@googlegroups.com

I do agree with you, I always observed that the exchange is created at the first time you call Send() on the sendendpoint


‪Le jeu. 5 nov. 2020 à 16:28, ‫אורית חזן‬‎ <ori...@gmail.com> a écrit :‬

Chris Patterson

unread,
Nov 5, 2020, 9:57:20 PM11/5/20
to masstrans...@googlegroups.com
MassTransit won't create the exchange until you send a message. If the node application is creating the queue, it should also declare the exchange and bind that exchange to the queue, otherwise it will never receive any messages.

Reply all
Reply to author
Forward
0 new messages