public class BallerinaBroker extends Object
Modifier and Type | Method and Description |
---|---|
void |
addSubscription(String topic,
io.ballerina.messaging.broker.core.Consumer consumer)
Method to add a subscription to the broker operating in in-memory mode.
|
static BallerinaBroker |
getBrokerInstance() |
void |
publish(String topic,
byte[] payload)
Method to publish to a topic in the broker operating in in-memory mode.
|
void |
publish(String topic,
io.netty.buffer.ByteBuf payload)
Method to publish to a topic in the broker operating in in-memory mode, specifying the ByteBuf to publish.
|
void |
removeSubscription(io.ballerina.messaging.broker.core.Consumer consumer)
Method to remove a subscription to the broker operating in in-memory mode.
|
public static BallerinaBroker getBrokerInstance() throws Exception
Exception
public void addSubscription(String topic, io.ballerina.messaging.broker.core.Consumer consumer)
topic
- the topic for which the subscription is registeredconsumer
- the consumer to register for the subscriptionpublic void removeSubscription(io.ballerina.messaging.broker.core.Consumer consumer)
consumer
- the consumer representing the subscription to removepublic void publish(String topic, byte[] payload)
topic
- the topic for which the subscription is registeredpayload
- the payload to publish (message content)public void publish(String topic, io.netty.buffer.ByteBuf payload)
topic
- the topic for which the subscription is registeredpayload
- the ByteBuf representing the payload to publish (message content)Copyright © 2018 WSO2. All rights reserved.