In PubSub the participating OPC UA Applicationscan assume the roles Publisher and Subscriber. Publishersare the sources of data, while Subscribers consume that data. Communication in PubSubis message-based. 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 that supports sending and receiving messages between distributed systems. The implementation of this distribution depends on the Message Oriented Middleware.
- 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;
- a broker-based form, where the core component of the Message Oriented Middlewareis a message 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.