# Azure Service Bus Pubsub Certification
The purpose of this module is to provide tests that certify the Azure Service Bus Pubsub as a stable component.

## Test Plan
### Certification Tests
- Verify with single publisher / single subscriber
   - Run dapr application with 1 publisher and 1 subscriber
   - Publisher publishes to 2 topics
   - Subscriber is subscribed to 1 topic
   - Simulate periodic errors and verify that the component retires on error
   - Verify that all expected messages were received
   - Verify that subscriber does not receive messages from the non-subscribed topic
- Verify with single publisher / multiple subscribers with same consumerID
   - Run dapr application with 1 publisher and 2 subscribers
   - Publisher publishes to 1 topic
   - Subscriber is subscribed to 1 topic
   - Simulate periodic errors and verify that the component retires on error
   - Verify that all expected messages were received
- Verify with single publisher / multiple subscribers with different consumerIDs
   - Run dapr application with 1 publisher and 2 subscribers
   - Publisher publishes to 1 topic
   - Subscriber is subscribed to 1 topic
   - Simulate periodic errors and verify that the component retires on error
   - Verify that all expected messages were received
- Verify with multiple publishers / multiple subscribers with different consumerIDs
   - Run dapr application with 2 publishers and 2 subscribers
   - Publisher publishes to 1 topic
   - Subscriber is subscribed to 1 topic
   - Simulate periodic errors and verify that the component retires on error
   - Verify that all expected messages were received
- Verify data with a topic that does not exist
   - Run dapr application with 1 publisher and 1 subscriber
   - Verify the creation of service bus
   - Send messages to the service created
   - Verify that subscriber received all the messages
- Verify reconnection after the network interruptions
   - Run dapr application with 1 publisher and 1 subscriber
   - Publisher publishes to 1 topic
   - Subscriber is subscribed to 1 topic
   - Simulate network interruptions and verify that the component retires on error
   - Verify that all expected messages were received
- Verify with an optional parameter `disableEntityManagement` set to true
   - Run dapr application with 1 publisher
   - Publisher tries to publish to 1 topic that is not present
   - Verify that the topic and subscriptions do not get created
   - Verify that the error is returned saying that the topic not present when publishing
- Verify data with an optional parameter `defaultMessageTimeToLiveInSec` set
   - Run dapr application with 1 publisher and 1 subscriber
   - Subscriber is subscribed to 1 topic
   - Publisher publishes to 1 topic, wait double the TTL seconds
   - Verify the message is deleted/expired
- Verify data with authentication
   - Run dapr application with 1 publisher and 1 subscriber
   - Publisher publishes to 1 topic
   - Subscriber is subscribed to 1 topic
   - Verify that all expected messages were received
- Verify with multiple publishers / multiple subscribers on a single topic with multiple sessions are fifo
   - Run dapr application with 1 publisher and 2 subscribers
   - Publisher publishes to 1 topics on 2 sessions
   - Subscribe with sessions required
   - Verify the subscriber only received from 1 topic in fifo order
- Verify with multiple publishers / multiple susbcribers on a single topic with multiple sessions round robin
   - Run dapr application with 1 publisher and 2 subscribers
   - Publisher publishes to 1 topic on 2 sessions
   - Subscribe with session required
   - Verify the subscriber round robins between the 2 topics
