Project

General

Profile

MUC Room resends chat history on user reconnect

E A
Added almost 4 years ago

Hello,

I'm experiencing some strange behavior while using clustered MUC.

Running tigase server 7.0.0 / 2 cluster nodes on AWS instances behind load balancer (round robin).

Testing was done with Psi / Adium as clients

Scenario:

User A creates room and invites user B.

User A & B sends a few messages

While connected to the room, if user A or B disconnect, once they reconnect, they re-receive their chat history:

[10:10:23] ddd

[10:10:47] ddds

[10:10:50] hello

[10:10:55] .whats up

[10:11:05] *** Disconnected.

[10:11:11] *** Reconnecting...

[10:11:11] *** Connected.

[10:10:23] ddd

[10:10:47] ddds

[10:10:50] hello

[10:10:55] .whats up

I dont think this is correct behavior.

Could you advise what can be causing this?

my custom init.properties file - is there something wrong here?:

#TIGASE XMPP CONFIGURATION FILE

#SYSTEM

--vhost-register-enabled = true
--user-repo-pool-size=12

#Cluster

--new-connections-throttling = 5222:5000000,5280:5000000,5223:5000000,5277:5000000
--cm-ht-traffic-throttling = xmpp:0:0:disc,bin:0:0:disc
--cm-traffic-throttling = xmpp:0:0:disc,bin:0:0:disc
c2s/cm-see-other-host/active=OPEN;LOGIN
--cm-see-other-host=none
--cluster-mode = true
--sm-cluster-strategy-class=tigase.cluster.strategy.OnlineUsersCachingStrategy


#Applicatiopn

--sm-plugins = -msgoffline,-message-carbons,+message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,-starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,-zlib
--debug = server,xmpp.impl,db
config-type = --gen-config-all

#Domain Configuration

--admins = admin@tigase-xmpp1.localdomain
--virt-hosts = xmpp-tigase1.localdomain

#Database Configuration

--auth-db-uri = jdbc:mysql://db/authdb?user=tigase&password=tigase12&autoCreateUser=true
--auth-db = tigase-custom
--user-db-uri = jdbc:mysql://db/tigasedb?user=tigase&password=tigase12&autoCreateUser=true
--user-db = mysql

##COMPONENTS


#MUC Component
--comp-class-1 = tigase.muc.cluster.MUCComponentClustered
--comp-name-1 = muc
--sm-cluster-strategy-class=tigase.server.cluster.strategy.OnlineUsersCachingStrategy
muc/muc-strategy-class[S]=tigase.muc.cluster.ShardingStrategy
muc/message-filter-enabled[B]=false
muc/presence-filter-enabled[B]=false
muc/muc-allow-chat-states[B]=true
muc/muc-lock-new-room[B]=false


#PUBSUB Component

#--comp-class-2 = tigase.pubsub.PubSubComponent
--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered
--comp-name-2 = pubsub

#REST API Component
#--comp-class-3 = tigase.http.rest.RestMessageReceiver
#--comp-name-3 = rest

#Message-Archive Component
--comp-class-4 = tigase.archive.MessageArchiveComponent
--comp-name-4 = message-archive
message-archive/archive-repo-uri=jdbc:mysql://db/tigasedb?user=tigase&password=tigase12&autoCreateUser=true
sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@xmpp-tigase1.localdomain

##CUSTOM AUTH

#TCP/IP Init
basic-conf/auth-repo-params/conn-valid-query=select 1

#DB Init
basic-conf/auth-repo-params/init-db-query=update users set status = 0

#Login
basic-conf/auth-repo-params/user-login-query={ call TigUserLogin1(?, ?) }

#User Count
basic-conf/auth-repo-params/users-count-query=select count(*) from users

#Add User
basic-conf/auth-repo-params/add-user-query=insert into users (username, pass_ct) values (?, ?)

#Remove User
basic-conf/auth-repo-params/del-user-query=delete from users where username = ?

#Get Password
basic-conf/auth-repo-params/get-password-query=select pass_ct from users where username = ?

#Update Password
basic-conf/auth-repo-params/update-password-query=update users set pass_ct = ? where username = ?

#Logout
basic-conf/auth-repo-params/user-logout-query={ call TigUserLogout1(?) }

#Non-SASL Mechanism
basic-conf/auth-repo-params/non-sasl-mechs=password

#SASL Mechanism
basic-conf/auth-repo-params/sasl-mechs=PLAIN
#sess-man/plugins-conf/enabled-mechanisms=PLAIN

Replies (2)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Actually this is defined in the specification: Discussion History Any client may choose to ignore history (for example while re-connecting) by including <history/> tag (with desired attributes) in the initial presence send to the room.

Added by E A almost 4 years ago

Right you are.

Thanks!

    (1-2/2)