question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibly incorrect behavior of `Send` method

See original GitHub issue

Hello. I’m trying to configure MassTransit to throw an error if there is no suitable queue for consuming the message.

As I see in this comment by @alexeyzimarev the correct way to achieve this is by using Send method instead of Publish.

But the only difference I see between Send and Publish methods is names of queues to push message.

Both deprecated and latest documentation doesn’t explain this aspect.

Also I see that I can set Mandatory flag on PublishContext when using Publish method, but I can’t find the way to configure such behavior globally.

Can you please explain me how to configure & use MassTransit to implement desired behaviour?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
phatboygcommented, Jul 5, 2017

If you set Mandatory on Send or Publish, it will throw an exception (for RabbitMQ) if there are no exchange bindings.

If you want Send to create the queue for you, I think you can add &bindQueue=true to the endpoint address.

1reaction
alexeyzimarevcommented, Jul 5, 2017

My comment was incorrect. It is mentioned below in the thread that messages are sent to the exchange. If there is no consumer for that message - there will be no binding, so the message will disappear. I am not aware of any way to ensure that there is a consumer for your message at the moment you use Send.

The difference between Send and Publish is fundamental and described by @maldworth in details here https://www.maldworth.com/2015/10/27/masstransit-send-vs-publish/

Read more comments on GitHub >

github_iconTop Results From Across the Web

send and recv are not consistent
My problem is that i need to program a fairly easy server client application in which both take responses and reply to them....
Read more >
send(2) - Linux manual page
EOPNOTSUPP Some bit in the flags argument is inappropriate for the socket type. EPIPE The local end has been shut down on a...
Read more >
socket — Low-level networking interface
This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, MacOS, and probably additional platforms....
Read more >
TCP/IP connectivity issues troubleshooting - Windows Client
Learn how to troubleshoot TCP/IP connectivity and what you should do if you come across TCP reset in a network capture.
Read more >
DocuSign Developer FAQ: Templates, Envelopes, and ...
Templates help streamline the sending process when you frequently send the ... What are some of the possible behaviors and issues during template...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found