Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary development online and offline messages #211

Open
whwususu opened this issue Jul 10, 2023 · 6 comments
Open

Secondary development online and offline messages #211

whwususu opened this issue Jul 10, 2023 · 6 comments
Labels
question Further information is requested

Comments

@whwususu
Copy link

whwususu commented Jul 10, 2023

I created a 'packet' to send online and offline messages, and then pushed it to the 'sess man' component

from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" from="[email protected]/2137503554-tigase-1"/>, SIZE=81, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null 

Can't 'from' be empty? I only ran to 'sess man' and didn't continue running anymore, and there was no error reported. Online and offline messages cannot be sent to individuals. Thank you!

@whwususu whwususu added the question Further information is requested label Jul 10, 2023
@whwususu
Copy link
Author

whwususu commented Jul 10, 2023

[2023-07-10 17:25:27:587] [FINEST  ] [      pool-23-thread-8 ] ClientConnectionManager.processSocketData(): Processing socket data: from=null, to=null, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" busi="online"/>, SIZE=47, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null from connection: ws2s@laptop-jjogo4vd/0:0:0:0:0:0:0:1_5290_0:0:0:0:0:0:0:1_58235
[2023-07-10 17:25:27:829] [FINEST  ] [         in_1-sess-man ] SessionManager.processPacket()   : Received packet: from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" from="[email protected]/2137503554-tigase-1"/>, SIZE=81, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null
[2023-07-10 17:25:27:829] [INFO    ] [         in_1-sess-man ] SessionManager.getXMPPResourceConnection(): Message without TO attribute set, don't know what to do wih this: from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" from="[email protected]/2137503554-tigase-1"/>, SIZE=81, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=86e18cb5-ac51-416c-bc86-4994e463a013
[2023-07-10 17:25:27:829] [FINEST  ] [         in_1-sess-man ] SessionManager.processPacket()   : processing packet: from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" from="[email protected]/2137503554-tigase-1"/>, SIZE=81, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=86e18cb5-ac51-416c-bc86-4994e463a013, connection: null
[2023-07-10 17:25:27:829] [FINEST  ] [         in_1-sess-man ] SessionManager.walk()            : XMPPProcessorIfc: MessageAmp (amp)Request: from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" from="[email protected]/2137503554-tigase-1"/>, SIZE=81, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=86e18cb5-ac51-416c-bc86-4994e463a013, conn: null
[2023-07-10 17:25:27:832] [FINEST  ] [         in_1-sess-man ] SessionManager.walk()            : XMPPProcessorIfc: PresenceState (presence-state)Request: from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" from="[email protected]/2137503554-tigase-1"/>, SIZE=81, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=86e18cb5-ac51-416c-bc86-4994e463a013, conn: null
[2023-07-10 17:25:27:835] [FINEST  ] [         in_1-sess-man ] SessionManager.processPacket()   : Packet processed by: [amp, presence-state]
[2023-07-10 17:25:30:416] [FINE    ] [           stats-cache ] ComponentInfo.lambda$getImplementationVersion$0(): Problem obtaining version for class: tigase.dist.XmppServerDist, exception: tigase.dist.XmppServerDist
[2023-07-10 17:25:30:416] [WARNING ] [           stats-cache ] ComponentInfo.lambda$getImplementationVersion$1(): Problem obtaining current version information

@whwususu
Copy link
Author

whwususu commented Jul 10, 2023

image

message-router--QueueListener:from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" to="[email protected]"/>, SIZE=59, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null
[2023-07-10 19:14:45:284] [WARNING ] [           stats-cache ] ComponentInfo.lambda$getImplementationVersion$1(): Problem obtaining current version information
sess-man--QueueListener:from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" to="[email protected]"/>, SIZE=59, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null
[2023-07-10 19:14:46:783] [WARNING ] [           stats-cache ] ComponentInfo.lambda$getImplementationVersion$1(): Problem obtaining current version information
[2023-07-10 19:14:50:783] [WARNING ] [ presence-state-proc-1 ] PresenceState.processInInitial() : Initial presence without from attribute set: from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" to="[email protected]"/>, SIZE=59, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=AUTH, TYPE=null, STABLE_ID=40d6e8d3-c6d7-48ab-8de8-127522b1869c 

@whwususu
Copy link
Author

whwususu commented Jul 10, 2023

message-router--QueueListener:from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" to="[email protected]" from="[email protected]"/>, SIZE=87, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null
sess-man--QueueListener:from=null, to=sess-man@laptop-jjogo4vd, serverAuthorisedStanzaFrom=Optional.empty, DATA=<presence xmlns="jabber:client" to="[email protected]" from="[email protected]"/>, SIZE=87, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=null, STABLE_ID=null

@woj-tek
Copy link
Contributor

woj-tek commented Jul 10, 2023

Can't 'from' be empty? I only ran to 'sess man' and didn't continue running anymore, and there was no error reported. Online and offline messages cannot be sent to individuals. Thank you!

Can you restate your problem more clearly?

Firstly: you are sending a presence packet (which is used to signal if you are offline or online) and not a message.
Secondly: for message packet you have to provide to address, so the server knows where to send the message. from can be optional in this case, though it's better to specify it as well.

@whwususu
Copy link
Author

whwususu commented Jul 11, 2023

Can't 'from' be empty? I only ran to 'sess man' and didn't continue running anymore, and there was no error reported. Online and offline messages cannot be sent to individuals. Thank you!

Can you restate your problem more clearly?

Firstly: you are sending a presence packet (which is used to signal if you are offline or online) and not a message. Secondly: for message packet you have to provide to address, so the server knows where to send the message. from can be optional in this case, though it's better to specify it as well.

thank you!
In 'AbstractMessageReceiver->addPacket',I intercepted the packet and serialized it into a string. After processing through the grpc program, return to the program, convert the string into a packet, call the addOutPacket method of SessionManager, and throw this packet into .

Test01 logs in on the first server, test02 logs in on the second server, and the login message of test02 is forwarded to the first server, which then notifies all users who log in on the first server

@woj-tek
Copy link
Contributor

woj-tek commented Jul 12, 2023

In 'AbstractMessageReceiver->addPacket',I intercepted the packet and serialized it into a string. After processing through the grpc program, return to the program, convert the string into a packet, call the addOutPacket method of SessionManager, and throw this packet into .

How do you convert that string into the packet?

Test01 logs in on the first server, test02 logs in on the second server, and the login message of test02 is forwarded to the first server, which then notifies all users who log in on the first server

What are you trying to achieve here? It looks like some sort of clustering? Which Tigase supports natively?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants