Have not had chance to test but can you try with the following small patch (against master):
diff --git a/modules/dmq/dmq_funcs.c b/modules/dmq/dmq_funcs.c
index 3c9c8c3..331591f 100644
--- a/modules/dmq/dmq_funcs.c
+++ b/modules/dmq/dmq_funcs.c
@@ -370,6 +370,7 @@ error:
int cfg_dmq_t_replicate(struct sip_msg* msg, char* s)
{
dmq_node_t* node;
+ struct socket_info* sock;
int i = 0;
/* avoid loops - do not replicate if message has come from another node
@@ -381,6 +382,11 @@ int cfg_dmq_t_replicate(struct sip_msg* msg, char* s)
return -1;
}
+ sock = lookup_local_socket(&dmq_server_socket);
+ if (sock) {
+ set_force_socket(msg, sock);
+ }
+
lock_get(&node_list->lock);
node = node_list->nodes;
while(node) {