Project

General

Profile

How to capture chat message?

Gaurav Gupta
Added over 4 years ago

Hi,

I need to figure out the fact that, does tigase support storing of chat message. Following is the scenario for me:

=============================Case 1====================================

Condition: UserA is offline

Client tool: Psi

Procedure:

  1. UserB selects the UserA(offline).

  2. Selects "Open Chat Window".

  3. Sends some message.

--> When i perform this operation, i am not seeing any entry for the "chat message" in 'msg_history' table.

=============================Case 2=====================================

Condition: UserA is offline

Client tool: Psi

Procedure:

  1. UserB selects the UserA(offline).

  2. Selects "Send Message".

  3. Sends some message.

--> When i perform this operation, i can see an entry for the "message" in 'msg_history' table.

=============================Case 3=====================================

Condition: UserA is online

Client tool: Psi

Procedure:

  1. UserB selects the UserA(online).

  2. Selects "Open Chat Window".

  3. Sends some message.

--> When i perform this operation, i cannot see any entry for the "chat message" in 'msg_history' table.

=======================================================================

Now the question arises, Do tigase maintain chat message?

Am i looking in some wrong table?

My init.properties file is attached below.

init.properties (1 KB) init.properties Properties file

Replies (5)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

What is the particular outcome that you expect? There are two different mechanisms when it comes to storing messages - one is to only store messages to users that are offline (so when they come back online they will be delivered) and the second one is to maintain full archive of all messages send by the client. The first one is enabled by default, the second one needs additional configuration - please see Tigase Message Archiving project.

Added by Gaurav Gupta over 4 years ago

In my case i want all the chats should be stored in separate db(Like in the link), since that db may go massive soon, so Mongodb is first choice.

I also came through the fact that tigase is now supporting mongodb( not much sure about whether it is production ready or not).

Also, i went through the configuration, but for some reason i am seeing 'Unknown Database 'messagearchivedb' ' in the logs. although, i haven't dig up into the logs. I will try to fix the issue in configuration.

init.properties (1.09 KB) init.properties properties file
tigase-console.log (18 KB) tigase-console.log log file

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Please try adding type to the parameter (i.e. @[S]@):

message-archive/archive-repo-uri[S]=jdbc:mysql://localhost/messagearchivedb?user=root&password=noida@123

Added by Gaurav Gupta over 4 years ago

This results in another issue, now it seems tigase is not picking up the username and password, hence resulting in following exception:

2014-09-25 11:09:27.253 [main] MessageArchiveDB.initRepository() WARNING: MessageArchiveDB initialization exception

java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)

Is their any place where i can find all these parameter (like [S] you mentioned )

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Can you updated to the more recent version of Tigase (and message archive component)? Repository access was a bit reworked since release 5.2.0.

One place is online documentation Alternatively you can see generated init.properties with all settings in etc/config-dump.properties

    (1-5/5)