@ProviderType public class SolaceSDTMapToMessageConverter extends Object implements com.solace.messaging.util.internal.SolaceTypeConverter.SolaceTypeToMessage<SolaceSDTMap>, Converter.ObjectToBytes<SolaceSDTMap>
SolaceSDTMapToMessageConverter
with the OutboundMessageBuilder#build(Serializable, ObjectToBytes)
.
final MessagingService service; //Assuming service instance is initialized
final DirectMessagePublisher messagePublisher = service
.createDirectMessagePublisherBuilder()
.build().start();
final Topic toDestination = Topic.of("some/topic");
final SolaceSDTMap content = new SolaceSDTMap();
content.putString("keyWord", "helloWorld");
final OutboundMessage message = service.messageBuilder()
.build(content, new SolaceSDTMapToMessageConverter());
messagePublisher.publish(message, toDestination);
For corresponding receiver sample refer to the MessageToSDTMapConverter
Converter.BytesToObject<T extends Serializable>, Converter.ObjectToBytes<T extends Serializable>
Constructor and Description |
---|
SolaceSDTMapToMessageConverter() |
Copyright 2019-2024 Solace Corporation. All rights reserved.