Skip to content

How to know which queue a message is received on? #1086

Closed Answered by mookid8000
jorgenbosman asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately no – at least not at the moment.

Being able to host multiple Rebus instances in the same container instance is a fairly new thing, so it has never really been relevant to provide this information anywhere, but I can definitely see how it could be useful in some cases.

To fix your issue right away, you can extend your Rebus instances with a small plugin that makes the queue name available. It can be done like this – first, create a nice extension method that adds the queue name to the incoming step context in the form of an InputQueueName object:

public static class NiftyRebusConfigurationExtensions
{
    public static void AddInputQueueNameToStepContext(this OptionsConfigurer 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mookid8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants