erlCass and ejabberd

I am new to ejabberd development and I am trying to develop an App with ejabberd and Scylla db. I have found one module erlCass whcih can be install with ejabberd. I have install the erlCass by adding in ejabberd dependencies but now I am not able to call any query .

I have modified the ejabberd_mnesia.erl add these line in its start function
start() ->
[
{marina, [
{ip, "10.128.0.2"},
{keyspace, <<"load_test_erlcass">>},
{backlog_size, 10000},
{pool_size, 30}
]},

{cqerl, [
{cassandra_nodes, ["10.128.0.2"]},
{keyspace, load_test_erlcass},
{protocol_version, 3}
]},

{erlcass, [
{keyspace, <<"load_test_erlcass">>},
{cluster_options,[
{contact_points, <<"10.128.0.2">>},
{latency_aware_routing, true},
{token_aware_routing, true},
{number_threads_io, 8},
{queue_size_io, 128000},
{core_connections_host, 5},
{max_connections_host, 5},
{tcp_nodelay, true},
{tcp_keepalive, {true, 60}},
{pending_requests_high_watermark, 128000},
{connect_timeout, 5000},
{request_timeout, 20000},
{retry_policy, {default, true}}
]}
]}
],
{ok, _} = application:ensure_all_started(erlcass),

But When I try to execute this query
ok = erlcass:query(<<"CREATE KEYSPACE erlang_driver_test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}">>).
The ejabberd give me undefined function erlcass

when I tried to add erlclass .hrl in the
-include("erlcass.hrl").

It give error can't find include file "erlcass.hrl"

Can you please give me any suggestion where I am wrong.

Thank you very much in advance.

If the error appears when

If the error appears when running the code, it probably means erlang can't find the erlcass.beam file. Copy it with all the other ejabberd installed beam files, and restart.

If the error appears when compiling the code, ir probably means the erlang compile can't find the erlcass.hrl file. Copy it with all the other erlang header files, in your source code dir, and recompile.

Thank you. I figure it out i

Thank you.
I figure it out i was missing the necessary files to include. You must have ti include erlcass.erl in your module
And also you need to update the app.config in the erlcass module with correct contact_points.

Syndicate content