'Angular subscribes activeMQ through wss and gets header is too large
my angular 12 project subscribes ActiveMQ through STOMP and recently I got Header is too large > 8192 error in ActiveMQ console. Can anyone please help to identify the potential reasons and solutions?
I am currently using
"@stomp/ng2-stompjs": "^8.0.0",
"@stomp/stompjs": "^6.1.2",
public subscribe(destination: string, messageQueueConfiguration: MessageQueueConfiguration): Subscription {
this._messageQueueConfiguration = messageQueueConfiguration;
this._rxStompService = rxStompServiceFactory(this.buildConfiguration(this._options.isDebug));
this._subscription = this._rxStompService.watch(destination).subscribe(async (stompMessage: StompMessage) => {
this.process(stompMessage);
});
return this._subscription;
}
Here is the warning message from ActiveMQ console
Here is the error messages in angular project (chrome console)
Solution 1:[1]
After checking the chrome's dev tool, I realise that, for some reason, all the cookies are also included in the request header. I manually clean up the cookies and it starts working.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ben |


