feat: implement direct message passing on a cluster#99
Conversation
3532e68 to
e87d5c3
Compare
af2dadb to
068c9fe
Compare
2e15c4a to
709c51e
Compare
f062c4f to
e3e77a8
Compare
| shared_subs_prefer_local_policy_test_with_local_caching/1, | ||
| shared_subs_local_only_policy_test/1, | ||
| shared_subs_local_only_policy_test_with_local_caching/1, | ||
| shared_subs_random_policy_dead_node_message_reaper_test/1, |
There was a problem hiding this comment.
why this test was removed, put this behind config while running if it requires redis.
There was a problem hiding this comment.
Updated, please check latest commit
| _ -> false | ||
| end, | ||
| vmq_state_store_backend:del_reaper(Node), | ||
| ets:insert(?VMQ_CLUSTER_STATUS, {Node, true, 0}), |
There was a problem hiding this comment.
this insert is always getting overridden below, remove if not needed.
| -spec delete(_) -> 'true' | {'error', 'redis_error'}. | ||
| delete(SubscriberId) -> | ||
| case vmq_state_store_backend:msg_store_delete(SubscriberId) of | ||
| case |
There was a problem hiding this comment.
Why are you adding this back? If you need to change the Redis call, then please change the parent call from the vmq_state_store_backend > vmq_redis_store & vmq_noop_store.
| case vmq_state_store_backend:msg_store_pop(SubscriberId, MsgRef) of | ||
| -spec delete(subscriber_id(), _) -> 'true' | {'error', 'redis_error'}. | ||
| delete(SubscriberId, _MsgRef) -> | ||
| case |
There was a problem hiding this comment.
Why are you adding this back? If you need to change the Redis call, then please change the parent call from the vmq_state_store_backend > vmq_redis_store & vmq_noop_store.
| ets:insert(?OFFLINE_MESSAGES, {count, binary_to_integer(OfflineMsgCount)}); | ||
| {error, _} -> | ||
| {error, not_supported} | ||
| {error, redis_error} |
There was a problem hiding this comment.
Can you share the reason behind the error message change?
17648d8 to
4570bc6
Compare
77707cc to
2c9e003
Compare
|
|
||
| stop(_State) -> | ||
| stop(State) -> | ||
| %% Catch and log the termination event using VerneMQ's native Lager logger |
There was a problem hiding this comment.
Is it only for debugging and testing in staging env? Do we need this in prod?
| {validators, ["buffer_size_validator"]} | ||
| ]}. | ||
|
|
||
| {mapping, "listener.vmq.$name.buffer_sizes", "vmq_server.listeners", |
There was a problem hiding this comment.
This is used on both receiver and sender sides with the values being [send buf, rec buf, erl buffer]. Currently we're using default value on receiver side and default OS value on sender side
| {datatype, string}, | ||
| hidden | ||
| ]}. | ||
| {mapping, "listener.vmqs.mountpoint", "vmq_server.listeners", [ |
There was a problem hiding this comment.
I think ssl connection configurations are not complete. Let's skip ssl for now.
We can add support for SSL later when required.
There was a problem hiding this comment.
Ok let's put it as improvement later
| "cache_shared_subscriptions_locally" | ||
| "cache_shared_subscriptions_locally", | ||
| "direct_message_passing", | ||
| "cluster_node_liveness_rpc_timeout" |
There was a problem hiding this comment.
Do we need this as runtime configurable?
There was a problem hiding this comment.
for cluster_node_liveness_rpc_timeout yes we don't need this, will remove this as part as clean up
| "graphite_interval", | ||
| "graphite_include_labels", | ||
| "shared_subscription_policy", | ||
| "remote_enqueue_timeout", |
There was a problem hiding this comment.
Do we need this as runtime configurable?
| {cluster_default_port, 44053}. | ||
| {http_default_ip, "127.0.0.1"}. | ||
| {http_default_port, 8888}. | ||
| {metadata_plugin, vmq_plumtree}. |
There was a problem hiding this comment.
We are not using this as well. Can you just verify and remove it if it is unused?
edf5472 to
a0fa828
Compare
a0fa828 to
9d639f5
Compare
Proposed Changes
Implement direct message passing node to node to reduce latency
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
CODE_OF_CONDUCT.mddocument