2

I have a rebus- worker that runs on azure queue, I have configured the rebusworker that will receive and send messages and it works fine. But then I want to set up a client as a oneway client like this:

   _bus = Configure.With(adapter)                
                .Transport(
                t =>
                    t.UseAzureStorageQueuesAsOneWayClient(AppSettingsReader.AzureStorage)
                )

            .Routing(r => r.TypeBased()
                .MapAssemblyOf<SomeCommand>(queueAddress)
            )

            })
            .Start();
    }

Where can i set the queue name I want to send messages to? As is it returns a null-reference exception for queuename.

I'm using rebus and rebus.AzureStorage 0.99.74

vegard.p
  • 21
  • 1

1 Answers1

0

The queueAddress in your snippet should be name of the queue, to which you would like to send messages from the assembly of SomeCommand.

To be very concrete, let's pretend you

.Routing(r => r.TypeBased()
    .MapAssemblyOf<SomeCommand>("commandprocessor")
)

and then you

await bus.Send(new SomeCommand(...));

then Rebus will send that message to the queue commandprocessor.

mookid8000
  • 18,258
  • 2
  • 39
  • 63
  • Thank you for the answer, as a temporarily workaround I have done it like this to make it work. Because the oneway client cast an exception I configured it as a regular client with a dummy queue address in the transport settings. And I added the queuename I want to use in Routing.. .Transport( t => t.UseAzureStorageQueues(AppSettingsReader.AzureStorage,"dummyqueue") ) .Routing(r => r.TypeBased() .MapAssemblyOf("NameofTheQueueToSendTo") ) – vegard.p Dec 13 '16 at 11:04