-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2021.0
-
Component/s: Configuration
-
Release Notes Summary:PubSub now uses the stream implementation by default.
-
Tags:
-
Backlog priority:900
-
Team:PLATFORM
-
Sprint:nxplatform #85
-
Story Points:3
Pre-requisite:
configure 2 Nuxeo nodes in cluster (with Kafka enabled)
nuxeo.cluster.enabled=true nuxeo.cluster.nodeid=xxx kafka.enabled=true kafka.topicPrefix=nuxeolts2021- # required on the second node if same machine nuxeo.server.http.port=9080 nuxeo.server.ajp.port=9009 nuxeo.server.tomcat_admin.port=9005
Steps to reproduce
- on node 1, create a new user and then visit /nuxeo/api/v1/user/xxx
- on node 2, update the first name of this new user and then visit /nuxeo/api/v1/user/xxx => observe that the first name in the JSON response is the updated one
- on node 1, visit /nuxeo/api/v1/user/xxx => observe that the first name is the old one
Observed result : the changes are not propagated to the other node
Expected result: the changes are propagated to the other node
While investigating, we found that the provider for the invalidation in PubSubServiceImpl#publish is MemPubSubProvider whereas it should be StreamPubSubProvider
The cause is that the property "nuxeo.pubsub.provider" is still empty when kafka is enabled.
Adding nuxeo.pubsub.provider=stream to nuxeo.conf fixes the issue. Note that this is the recommended configuration at https://doc.nuxeo.com/nxdoc/kafka/#andquotno-redisandquot-nuxeo-cluster