Skip to content

Error handling in WebSocketInboundChannelAdapter start() method #8785

Closed
@rodrigo-cirne

Description

@rodrigo-cirne

In what version(s) of Spring Integration are you seeing this issue?

6.1.4.RELEASE

Describe the bug

WebSocketInboundChannelAdapter does not capture exceptions raised by it's IntegrationWebSocketContainer start() method.

To Reproduce

  1. Create a StandardWebSocketClient;
  2. Create a ClientWebSocketContainer pointing to an invalid URI using the StandardWebSocketClient;
  3. Create a WebSocketInboundChannelAdapter using the ClientWebSocketContainer and set it's errorChannel;
  4. Create an IntegrationFlow from the WebSocketInboundChannelAdapter;
  5. Create an IntegrationFlowContext and register the IntegrationFlow in it with autorun set to false;
  6. Retrieve the IntegrationFlow from the IntegrationFlowContext and call it's start() method.

Expected behavior

Since the URI in the ClientWebSocketContainer is invalid, the thrown Exception should be captured and directed to the errorChannel.

Sample

https://github.com/rodrigo-cirne/ws

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions