2

I have been using Spring XD for a while for continuous ingestion of sensor data and it works perfectly.

The new requirement that I have is the ability to "replay" portions of that data. In my particular case it would be reading from MongoDB (with a certain query), generate a UDP packet with a certain filed of the entry and send it to a SocketAddress in a fixed interval of time.

The first attempt that I am implementing is through spring-batch job. The reader is simple since it is just querying MongoDB for the data, but I am concern about the UDP portion. It does not feel natural to use spring-batch for sending UDP packets, so I would like to know if anybody can suggest me an idea for implementing this.

Thanks

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
dmendezg
  • 1,888
  • 1
  • 15
  • 23

1 Answers1

1

You could use a custom XD source with a MongoDB Inbound Channel Adapter piped to a custom sink using a UDP Outbound Channel Adapter.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • I have those, my problem is the replay concept. I want to be able to start/stop the replay of a portion of the data and the itemization of the entries. – dmendezg Sep 10 '14 at 17:01