Socket middleware

Is it possible to create a server socket in the middleware that listens automatically when deployed? The idea is to capture the data that is generated from a series of sensors that are read from a raspberry and this would transmit them to the middleware directly.

Any suggestions or help will be welcome.

Best regards

Nelson F

1 Like

Hi Nelson,

This should not be a problem. Create a managed bean on the middleware and a method in it which will be invoked upon AppContextStartedEvent (see code examples here: Application Lifecycle Events). And nothing prevents you from starting a TCP server in this method.

1 Like