Skip to content

SockJS Event Bus Bridge does not keep web sessions alive for clustered session managers #2600

@cgm-aw

Description

@cgm-aw

Version

>= 4.5.0 (older are probably also affected)

Context

When using the SockJS event bus bridge, EventBusBridgeImpl#internalHandlePing keeps the web session alive by calling Session#setAccessed
However this only works for a local session storage. ClusteredSessionStoreImpl does not honor Session#lastAccessed but rather uses the TTL feature of AsyncMap.

Do you have a reproducer?

Yes please check out https://github.com/cgm-aw/vertx-sessiontimeout-reproducer

Steps to reproduce

  1. Deploy a verticle with a clustered session manager
  2. Perform a http call, you will get a web session
  3. Open a SockJS connection and utilize the event bus bridge so the periodic ping happens
  4. Wait until the configured session timeout is over
  5. Perform another http call, you will get a new web session <- the ping should have kept the original session alive

Please check out my reproducer, you can reproduce the issue and also see how the mechanism works fine with the local session storage.

Best regards

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions