Publish message to Azure ServiceBus topics

Hey I am looking at a code example of how to publish message to Azure servicebus topic from a service endpoint.
The example given in office website is a simple request reply.
Can anyone help?

Hi

Not sure what you are really looking for. Can you elaborate a bit?

Are you looking for something else than this simple example here https://docs.particular.net/samples/azure/azure-service-bus/ ?

Regards
Daniel

Hi @sun_sunny,

You could pick up almost any sample on our documentation site and use that. You can start to see how it works with the Learning Transport. It’s a transport we created to be able to have everyone run the samples. No need for MSMQ or any other transport. If you’re able to compile the sample, it should work.

If the publish/subscribe sample works with the Learning Transport, just set up the same sample to work with Azure Service Bus and it should work. NServiceBus abstracts away the code to talk to Azure Service Bus and adds a whole bunch of features on top of it.

Let me know if that helps.

Thanks, Dennis.
I tried to following the sample, but got this error
The remote server returned an error: (400) Bad Request. SubCode=40000. The property ‘AutoDeleteOnIdle’ cannot be set when creating a Queue because the namespace ‘sunnyesb’ is using ‘Basic’ tier.

Does it mean that we can’t use basic tier subscription in Azure when using Nservicebus?

Basic tier doesn’t support topics and subscriptions. You won’t be able to leverage native pub/sub regardless of NServiceBus.