Commit a9984fea authored by Ina Curdt's avatar Ina Curdt
Browse files

SI-283: DTO angepasst, Payload wird gesendet

parent f38a1e11
...@@ -42,7 +42,7 @@ public class EventProducerConfig { ...@@ -42,7 +42,7 @@ public class EventProducerConfig {
public MessageHandler messageHandler() { public MessageHandler messageHandler() {
return message -> rabbitTemplate.convertAndSend(exchangeName, routingKey, message.getPayload(), message1 -> { return message -> rabbitTemplate.convertAndSend(exchangeName, routingKey, message.getPayload(), message1 -> {
message1.getMessageProperties().getHeaders().put("metaId", message.getHeaders().get("metaId")); message1.getMessageProperties().getHeaders().put("metaId", message.getHeaders().get("metaId"));
message1.getMessageProperties().getHeaders().put("description", message.getHeaders().get("documentType")); message1.getMessageProperties().getHeaders().put("description", message.getHeaders().get("description"));
message1.getMessageProperties().getHeaders().put("source", message.getHeaders().get("source")); message1.getMessageProperties().getHeaders().put("source", message.getHeaders().get("source"));
return message1; return message1;
}); });
......
...@@ -24,6 +24,7 @@ public class ForeignFailureDto implements Serializable { ...@@ -24,6 +24,7 @@ public class ForeignFailureDto implements Serializable {
private String source; private String source;
private String metaId; private String metaId;
private String description; private String description;
private String json; private String payload;
private String rabbitMqKey; private String rabbitMqRoutingKey;
private String rabbitMqExchangeName;
} }
...@@ -41,7 +41,8 @@ public class ImportService { ...@@ -41,7 +41,8 @@ public class ImportService {
try { try {
messageImportChannel.send(MessageBuilder.withPayload(new ObjectMapper().setDateFormat(new SimpleDateFormat(INDEXING_DATE_FORMAT)).writeValueAsString(foreignFailureDto)) //messageImportChannel.send(MessageBuilder.withPayload(new ObjectMapper().setDateFormat(new SimpleDateFormat(INDEXING_DATE_FORMAT)).writeValueAsString(foreignFailureDto))
messageImportChannel.send(MessageBuilder.withPayload(foreignFailureDto.getPayload())
.setHeader("metaId", foreignFailureDto.getMetaId()) .setHeader("metaId", foreignFailureDto.getMetaId())
.setHeader("description", foreignFailureDto.getDescription()) .setHeader("description", foreignFailureDto.getDescription())
.setHeader("source", foreignFailureDto.getSource()) .setHeader("source", foreignFailureDto.getSource())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment