Use an empty AMQP Message body instead of a null value (#1200)
This commit is contained in:
committed by
GitHub
parent
3d35ff5aef
commit
7e28fba104
@@ -367,7 +367,7 @@ public class AmqpMessageDispatcherService extends BaseAmqpService {
|
||||
return;
|
||||
}
|
||||
|
||||
final Message message = new Message(null, createConnectorMessagePropertiesDeleteThing(tenant, controllerId));
|
||||
final Message message = new Message("".getBytes(), createConnectorMessagePropertiesDeleteThing(tenant, controllerId));
|
||||
amqpSenderService.sendMessage(message, URI.create(targetAddress));
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ public class AmqpMessageDispatcherService extends BaseAmqpService {
|
||||
return;
|
||||
}
|
||||
|
||||
final Message message = new Message(null,
|
||||
final Message message = new Message("".getBytes(),
|
||||
createConnectorMessagePropertiesEvent(tenant, controllerId, EventTopic.REQUEST_ATTRIBUTES_UPDATE));
|
||||
|
||||
amqpSenderService.sendMessage(message, URI.create(targetAddress));
|
||||
|
||||
@@ -66,7 +66,7 @@ public abstract class AbstractAmqpIntegrationTest extends AbstractIntegrationTes
|
||||
protected Message createMessage(final Object payload, final MessageProperties messageProperties) {
|
||||
if (payload == null) {
|
||||
messageProperties.setContentType(MessageProperties.CONTENT_TYPE_JSON);
|
||||
return new Message(null, messageProperties);
|
||||
return new Message("".getBytes(), messageProperties);
|
||||
}
|
||||
return getDmfClient().getMessageConverter().toMessage(payload, messageProperties);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user