-
Notifications
You must be signed in to change notification settings - Fork 426
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
How to get actual message xml packet with external code or by direct database query in MAM #4124
Comments
Hi, Ideally you want to use modules.mod_mam.db_message_format = "mam_message_xml" It will write XML as XML into the DB. Also, you could wanna tweak db_jid_format option too. https://esl.github.io/MongooseDocs/6.0.0/modules/mod_mam/#modulesmod_mamdb_message_format But changing it on the fly would not work (i.e. you need to start with an empty archive, all messages should be in one format, two formats would cause errors). But if you have binary format in DB, it is probably
Which is Erlang External Term format https://www.erlang.org/doc/apps/erts/erl_ext_dist.html
You can use some library to decode External format: https://www.npmjs.com/package/erlang_js |
Or you can use graphql API to ask MongooseIM to extract messages in the reasonable format. |
This is not available in MIM 4 version, any solution specific to MIM4 |
it is in mim 4.0.0. Module mod_mam_cassandra_arch:
So, provide {simple, true} to that mod_mam_cassandra_arch. How do you configure MAM? |
We are using MAM already with Cassandra, here is the config detail:
|
@sandeepjangir It is [16#3c, 16#6d, 16#65, 16#73].
"<mes" Use select blobastext(message) from mam_message limit 1; |
Thanks for the details @arcusfelis , I can see the raw can you also guide me to implement a feature where I can fetch a message from message id (the message xml packet id). MAM message table, the In short we need to modify message packet based on message id. Thanks in advance |
@sandeepjangir that is not possible.
|
MongooseIM version: 4.0.0
Installed from: source
Erlang/OTP version: build with source code
We are using MAM with Cassandra database, and want to extract the message xml packet from nodejs code. the
message
column in Cassandra table is into binary data.How we can get actual message packet with external code or by direct database query?
The text was updated successfully, but these errors were encountered: