Java Code Examples for org.springframework.amqp.core.MessageProperties#setReplyTo()
The following examples show how to use
org.springframework.amqp.core.MessageProperties#setReplyTo() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DmfSenderService.java From hawkbit-examples with Eclipse Public License 1.0 | 5 votes |
public void ping(final String tenant, final String correlationId) { final MessageProperties messageProperties = new MessageProperties(); messageProperties.getHeaders().put(MessageHeaderKey.TENANT, tenant); messageProperties.getHeaders().put(MessageHeaderKey.TYPE, MessageType.PING.toString()); messageProperties.setCorrelationId(correlationId); messageProperties.setReplyTo(amqpProperties.getSenderForSpExchange()); messageProperties.setContentType(MessageProperties.CONTENT_TYPE_TEXT_PLAIN); sendMessage(spExchange, new Message(null, messageProperties)); }
Example 2
Source File: DmfSenderService.java From hawkbit-examples with Eclipse Public License 1.0 | 5 votes |
private Message thingCreatedMessage(final String tenant, final String targetId) { final MessageProperties messagePropertiesForSP = new MessageProperties(); messagePropertiesForSP.setHeader(MessageHeaderKey.TYPE, MessageType.THING_CREATED.name()); messagePropertiesForSP.setHeader(MessageHeaderKey.TENANT, tenant); messagePropertiesForSP.setHeader(MessageHeaderKey.THING_ID, targetId); messagePropertiesForSP.setHeader(MessageHeaderKey.SENDER, "simulator"); messagePropertiesForSP.setContentType(MessageProperties.CONTENT_TYPE_JSON); messagePropertiesForSP.setReplyTo(amqpProperties.getSenderForSpExchange()); return new Message(null, messagePropertiesForSP); }
Example 3
Source File: DmfSenderService.java From hawkbit-examples with Eclipse Public License 1.0 | 5 votes |
private MessageProperties createAttributeUpdateMessage(final String tenant, final String targetId) { final MessageProperties messagePropertiesForSP = new MessageProperties(); messagePropertiesForSP.setHeader(MessageHeaderKey.TYPE, MessageType.EVENT.name()); messagePropertiesForSP.setHeader(MessageHeaderKey.TOPIC, EventTopic.UPDATE_ATTRIBUTES); messagePropertiesForSP.setHeader(MessageHeaderKey.TENANT, tenant); messagePropertiesForSP.setHeader(MessageHeaderKey.THING_ID, targetId); messagePropertiesForSP.setContentType(MessageProperties.CONTENT_TYPE_JSON); messagePropertiesForSP.setReplyTo(amqpProperties.getSenderForSpExchange()); return messagePropertiesForSP; }
Example 4
Source File: AbstractAmqpServiceIntegrationTest.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
protected Message createTargetMessage(final String target, final String tenant) { final MessageProperties messageProperties = createMessagePropertiesWithTenant(tenant); messageProperties.getHeaders().put(MessageHeaderKey.THING_ID, target); messageProperties.getHeaders().put(MessageHeaderKey.TYPE, MessageType.THING_CREATED.toString()); messageProperties.setReplyTo(DmfTestConfiguration.REPLY_TO_EXCHANGE); return createMessage(null, messageProperties); }
Example 5
Source File: AbstractAmqpServiceIntegrationTest.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
protected Message createPingMessage(final String correlationId, final String tenant) { final MessageProperties messageProperties = createMessagePropertiesWithTenant(tenant); messageProperties.getHeaders().put(MessageHeaderKey.TYPE, MessageType.PING.toString()); messageProperties.setCorrelationId(correlationId); messageProperties.setReplyTo(DmfTestConfiguration.REPLY_TO_EXCHANGE); return createMessage(null, messageProperties); }
Example 6
Source File: AmqpMessageHandlerServiceTest.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private MessageProperties createMessageProperties(final MessageType type, final String replyTo) { final MessageProperties messageProperties = new MessageProperties(); if (type != null) { messageProperties.setHeader(MessageHeaderKey.TYPE, type.name()); } messageProperties.setHeader(MessageHeaderKey.TENANT, TENANT); messageProperties.setContentType(MessageProperties.CONTENT_TYPE_JSON); messageProperties.setReplyTo(replyTo); return messageProperties; }
Example 7
Source File: AmqpControllerAuthenticationTest.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private MessageProperties createMessageProperties(final MessageType type, final String replyTo) { final MessageProperties messageProperties = new MessageProperties(); if (type != null) { messageProperties.setHeader(MessageHeaderKey.TYPE, type.name()); } messageProperties.setHeader(MessageHeaderKey.TENANT, TENANT); messageProperties.setContentType(MessageProperties.CONTENT_TYPE_JSON); messageProperties.setReplyTo(replyTo); return messageProperties; }