Events are published to an Azure Service Bus without NServicebus. Is it possbile and advisabile to use NServicesbus to subscribe and listen for theese Events?
(the body deserializer/serializer would be the same)
Events are published to an Azure Service Bus without NServicebus. Is it possbile and advisabile to use NServicesbus to subscribe and listen for theese Events?
(the body deserializer/serializer would be the same)
It is possible for NServiceBus to process messages that it didn’t send to AzureServiceBus.
Here is the documentation that explains how to process Native Messages.
Whether or not it’s advisable depends on your scenario. For example, if you are trying to integrate between two systems that both use the same AzureServiceBus namespace and one uses NServiceBus (with more than one endpoint) and the other does not, then this would be a good use case. However, if you are only trying to process a single message type, then it may be overkill to use NServiceBus.
We are already integrating multiple NServiceBus endpoints (and using features like Outbox) so we will stick to NServiceBus
But now we also have to listen to Events sent native with AzureServiceBus.
This linked documentation Native message access • Azure Service Bus Transport • Particular Docs does not seems to discuss how to listen to non-NServiceBus-Events.
take a look at the docum entation about native integration. It should answer your questions.
Thanks I see I have to set the header NServiceBus.EnclosedMessageTypes to make it work
What about pub/sub where NServicebus endpoint is the subscriber, will this also be possible?
(this is the other way around Azure Service Bus Pub/Sub Native Integration • Azure Service Bus Transport Samples • Particular Docs)
Hello,
Yes, you can use NServiceBus to subscribe and listen for events published to an Azure Service Bus, even if they weren’t originally published by NServiceBus.