Home
MessagingService messagingService = MessagingService.builder(ConfigurationProfile.V1)
.fromProperties(properties).build().connect();
DirectMessagePublisher publisher = messagingService.createDirectMessagePublisherBuilder()
.onBackPressureWait(1).build().start();
OutboundMessage message = messagingService.messageBuilder().build("Hello World!");
Topic topic = Topic.of("solace/try/this/topic");
publisher.publish(message, topic);
topic = Topic.of("solace/try/this/topic")
messaging_service = MessagingService.builder().from_properties(broker_props).build().connect()
direct_publisher = messaging_service.create_direct_message_publisher_builder().build().start()
outbound_msg = messaging_service.message_builder().build("Hello world!")
direct_publisher.publish(destination=topic, message=outbound_msg)
topic := resource.TopicOf("solace/try/this/topic")
messagingService, err := messaging.NewMessagingServiceBuilder().FromConfigurationProvider(brokerConfig).Build()
directPublisher, builderErr := messagingService.CreateDirectMessagePublisherBuilder().Build()
outbound_msg, err := messagingService.MessageBuilder().BuildWithStringPayload("Hello world")
publishErr := directPublisher.Publish(outbound_msg, topic)
// Publish using Spring Cloud Stream
@Bean
public Supplier
return () -> {
return "Hello World";
};
}
var message = solace.SolclientFactory.createMessage();
message.setDestination(solace.SolclientFactory.createTopicDestination("solace/try/this/topic"));
message.setBinaryAttachment("Sample Message");
message.setDeliveryMode(solace.MessageDeliveryModeType.DIRECT);
publisher.session.send(message);
curl -X POST http://[HOST]:[PORT]/solace/try/this/topic \
-d "Hello World REST" \
-H "Content-Type: text/plain"
--user [client-username]:[password]
String content = "Hello world from MQTT!"
MqttMessage message = new MqttMessage(content.getBytes())
message.setQos(0)
String topic = "solace/try/this/topic"
mqttClient.publish(topic, message)
JMSContext context = connectionFactory.createContext();
Topic topic = context.createTopic("solace/try/this/topic");
TextMessage message = context.createTextMessage("Hello world!");
JMSProducer producer = context.createProducer().setDeliveryMode(DeliveryMode.NON_PERSISTENT);
producer.send(topic, message);
Topic topic = session.createTopic("solace/try/this/topic");
MessageProducer messageProducer = session.createProducer(topic);
TextMessage message = session.createTextMessage("Hello world!");
messageProducer.send(topic, message, DeliveryMode.NON_PERSISTENT,
Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);

MessagingService messagingService = MessagingService.builder(ConfigurationProfile.V1)
.fromProperties(properties).build().connect();
Topic topic = Topic.of("solace/try/>");
DirectMessageReceiver receiver = messagingService.createDirectMessageReceiverBuilder()
.withSubscriptions(topic).build().start();
receiver.receiveAsync(messageHandler);
topic = Topic.of("solace/try/>")
messaging_service = MessagingService.builder().from_properties(broker_props).build().connect()
direct_receiver = messaging_service.create_direct_message_receiver_builder().with_subscriptions(topic).build().start()
direct_receiver.receive_async(MessageHandlerImpl())
topic := resource.TopicSubscriptionOf("solace/try/>")
messagingService, err := messaging.NewMessagingServiceBuilder().FromConfigurationProvider(brokerConfig).Build()
directReceiver, err := messagingService.CreateDirectMessageReceiverBuilder().WithSubscriptions(topic).Build()
err := directReceiver.Start()
regErr := directReceiver.ReceiveAsync(MessageHandler)
// Consume using Spring Cloud Stream
@Bean
public Consumer
return v -> System.out.println("Received: " + v);
}
subscriber.session.connect();
subscriber.session.subscribe(
solace.SolclientFactory.createTopicDestination("solace/try/>"),
true, correlationObject, 10000
);
http.createServer(function (req, res) {
console.log('Received message: ' + req.url);
res.writeHead(200);
res.end();
}).listen([PORT], '[HOST]');
console.log('Server running at http://[HOST]:[PORT]/');
mqttClient.connect(connOpts);
mqttClient.setCallback(new PrintingMqttCallback());
String topic = "solace/try/>";
int qos = 0;
mqttClient.subscribe(topic, qos);
JMSContext context = connectionFactory.createContext();
Topic topic = context.createTopic("solace/try/>");
JMSConsumer consumer = context.createConsumer(topic);
String message = consumer.receiveBody(String.class);
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = session.createTopic("solace/try/>");
MessageConsumer messageConsumer = session.createConsumer(topic);
messageConsumer.setMessageListener( new MessageDumpListener() );
connection.start();
What is Solace Event Broker?
Solace Event Broker is a complete event streaming solution that enables the design, deployment, and operation of Event-Driven Architecture (EDA) across hybrid cloud, multi-cloud and IoT environments. The heart of the platform consists of Event Brokers , which connect to form Event Meshes that dynamically route events in real-time, and the Event Portal which is pioneering how organizations manage their EDA.
Solace.dev is the home base for developers using the Solace Platform. You'll find information about our Messaging APIs, Platform APIs and more in the sections below. Have questions? Let us know over in the Solace Community.
Solace Event Portal
Solace Event Portal is the leading solution for organizations looking to maximize the value of their Event-Driven Architecture by enhancing the ability to optimize event flows, improve collaboration between developers and architects, and more!

Design & Visualize your EDA
Visualize event flows between application domains, applications, and payload schema to event relationships.

Embrace Event APIs
Curate and share sets of related high-value business events with internal and external developers to enrich customer experiences.

Catalog Your Event Data
Document and track existing topics, schemas, event meshes, pub/sub interfaces for each application, owners and points of contact, and changes for each of the managed EDA entities.

Operate your EDA
Create and track versions of EDA objects, promote them through environments and analyze dependencies to assess impact
Messaging APIs and Protocols
Solace Event Brokers have built-in support for a variety of proprietary and open standard protocols and APIs, so you can create and connect apps with whatever language, open protocols and APIs you choose, without worrying about translation.
Solace messaging APIs offer uniform client access to all Solace capabilities and qualities of service, and are available for C, .NET, iOS, Java, JavaScript, JMS, Python and Node.js. Solace also supports popular open protocols like AMQP, JMS, MQTT, REST and WebSocket, and open APIs such as Paho and Qpid.

Connect Using a Supported Client Library
Select a connection point and supported client library below to start messaging.
View by:
Library
Protocol
Solace REST Messaging API
Library
Protocol
Solace REST Messaging API
Library
Protocol
Solace REST Messaging API
Eclipse Paho Python Client
Library
Protocol
Library
Protocol
Solace REST Messaging API
Eclipse Paho JavaScript Client
Library
Protocol
Solace REST Messaging API
Library
Protocol
Solace REST Messaging API
Solace Platform APIs
The Solace Platform APIs are RESTful APIs that enable an API first approach to designing, managing, developing, and operating your Event-Driven Architecture while using Solace.
Solace Cloud REST APIs
Work programmatically with Solace Cloud.
SEMP (Solace Element Management Protocol)
Configure, Monitor, or take Action on the Solace Event Brokers.