Publish Subscribe Messaging as a service.
This is another variant of publish subscriber design pattern.
Sometimes organization offers “messaging as a service”. That means source application can publish and subscribe message directly to the message Queue or Topic. Messaging service should support HTTPS protocol. External application should connect with messaging service using HTTPS protocol. JMS connector can be used if source application is in intranet.
Target application can directly listen to the queue. But sometimes target application does not have the capability to directly listen to the queue or directly access the queue to retrieve messages. In that case we need a subscriber process, which will listen to the queue and push to the target.
To implement this design pattern we need a subscriber process and a batch process to handle failed messages. Integration layer does not need any publisher process.
Subscriber and batch process should be the same as described in main publisher and subscriber design pattern.
Additionally subscriber process can validate the message. If the messages are not valid, it may invoke a call back web service provided by source application to send the acknowledgment.
Acknowledgement can be sent to Source application from subscriber process or batch process as required.