With PubSub, OPC UA Applicationsdo not directly exchange requests and responses. Instead, Publisherssend messages to a Message Oriented Middleware, without knowledge of what, if any, Subscribersthere may be. Similarly, Subscribersexpress interest in specific types of data, and process messages that contain this data, without knowledge of what Publishersthere are.
Message Oriented Middlewareis software or hardware infrastructure supporting sending and receiving messages between distributed systems. It depends on the Message Oriented Middlewarehow this distribution is implemented.
- A broker-less form, where the Message Oriented Middlewareis the network infrastructure that is able to route datagram-based messages. Subscribersand Publishersuse datagram protocols like UDP multicast.
- A broker-based form, where the Message Oriented Middlewareis a Broker. Subscribersand Publishersuse standard messaging protocols like AMQP or MQTT to communicate with the Broker. All messages are published to specific queues (e.g. topics, nodes) that the Brokerexposes and Subscriberscan listen to these queues. The Brokermay translate messages from the formal messaging protocol of the Publisherto the formal messaging protocol of the Subscriber.
PubSubis used to communicate messages between different system components without these components having to know each other’s identity.
The knowledge about who Subscribers are and the forwarding of published data to the Subscribersis off-loaded to the Message Oriented Middleware. The Publisherdoes not know or even care if there is one or many Subscribers. Effort and resource requirements for the Publisherare predictable and do not depend on the number of Subscribers.