Skip to content

Unrecognized token 'CONNECT' #415

Open
@gertvermeersch

Description

@gertvermeersch

When connecting to a standard STOMP Broker using Spring Boot:

com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'CONNECT': was expecting ('true', 'false' or 'null')
 at [Source: (String)"CONNECT
accept-version:1.1,1.0
heart-beat:10000,10000

The debug from the ESP8266:

[WSc] Connected to url: /homecontrol/130/717372/websocket
[WSc] get text: o
[WSc] get text: c[1007,""]
[WSc] Disconnected!
[WSc] Connected to url: /homecontrol/130/717372/websocket
[WSc] get text: o

I just created a simple endpoint and a topic / queue:

    @Override
    public void configureMessageBroker(MessageBrokerRegistry config) {
        config.enableSimpleBroker("/topic", "/queue");
        config.setApplicationDestinationPrefixes("/app");
    }

    @Override
    public void registerStompEndpoints(StompEndpointRegistry registry) {
        registry.addEndpoint("/homecontrol").withSockJS();
    }

Using a simple Javascript page with SockJS works though... Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions