{"action":"created","issue":{"url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/issues/22","repository_url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication","labels_url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/issues/22/comments","events_url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/issues/22/events","html_url":"https://github.com/noxdafox/rabbitmq-message-deduplication/issues/22","id":373513831,"node_id":"MDU6SXNzdWUzNzM1MTM4MzE=","number":22,"title":"Support Request: Queue level deduplication","user":{"login":"atetzner","id":44438975,"node_id":"MDQ6VXNlcjQ0NDM4OTc1","avatar_url":"https://avatars0.githubusercontent.com/u/44438975?v=4","gravatar_id":"","url":"https://api.github.com/users/atetzner","html_url":"https://github.com/atetzner","followers_url":"https://api.github.com/users/atetzner/followers","following_url":"https://api.github.com/users/atetzner/following{/other_user}","gists_url":"https://api.github.com/users/atetzner/gists{/gist_id}","starred_url":"https://api.github.com/users/atetzner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atetzner/subscriptions","organizations_url":"https://api.github.com/users/atetzner/orgs","repos_url":"https://api.github.com/users/atetzner/repos","events_url":"https://api.github.com/users/atetzner/events{/privacy}","received_events_url":"https://api.github.com/users/atetzner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-10-24T14:31:00Z","updated_at":"2018-11-07T20:51:57Z","closed_at":null,"author_association":"NONE","body":"Could you please help me on queue level deduplication as in my case, it does not work as I expect it to do.\r\n\r\n## My setup\r\n\r\nI am using RabbitMQ 3.7.8 with Erlang 20.3.4 and message deduplication plugin 0.3.5\r\n\r\nI have created an exchange, queue and binding:\r\n```\r\n$RABBITMQADMIN declare queue \\\r\n    name=myqueue \\\r\n    durable=true \\\r\n    arguments=\"{\\\"x-message-deduplication\\\":true}\"\r\n\r\n$RABBITMQADMIN declare exchange \\\r\n    name=myexchange \\\r\n    type=topic\r\n\t\r\n$RABBITMQADMIN declare binding \\\r\n    source=myexchange \\\r\n    destination=myqueue \\\r\n    destination_type=queue \\\r\n    routing_key=#\r\n```\r\n\r\nThis gives me a queue with active deduplication.\r\n\r\n## Things that work as expected\r\n\r\nWhen I go to the RabbitMQ web interface, open up `myexchange` and publish a message with `x-deduplication-header=test` I see in the exchange, that the message has been accepted and routed to the queue; additionally in the queue, I see that the message arrived (\"Message rates\" graph) and the queue contains a message.\r\n\r\nWhen I publish another message with `x-deduplication-header=test` in `myexchange`, I again see in the exchange, that the message was accepted and routed to the queue. In the queue, I see that the message arrived (\"Message rates\" graph), but as the message contained the same deduplication key, there is still only one message in the queue.\r\n\r\nWhen I publish a message with `x-deduplication-header=another-test` in `myexchange`, I see in the exchange, that the message was accepted and routed to the queue. In the queue, I see that the message arrived (\"Message rates\" graph) and was added to the queue.\r\n\r\nFrom the web interface, I can consume both events and see the `test` and `another-test` deduplication key headers.\r\n\r\n## Things that dont' work as expected\r\n\r\nIn this state, when I now **again** publish a message with `x-deduplication-header=test` in `myexchange`, I again see in the exchange, that the message was accepted and routed to the queue. In the queue, I see that the message arrived (\"Message rates\" graph), **but** the message is not enqueued.\r\n\r\nThe README says:\r\n> Each message containing the `x-deduplication-header` header will not be enqueued if another message with the same header is already present within the queue.\r\n\r\nFrom this, I would expect, that the message is now enqueued, as there are no messages in the queue. Instead, it seems to me, as if the behaviour of the exchange level deduplication has been applied and the deduplication algorithm checks, if there has **ever been** a message with this deduplication key.\r\n\r\nAdditionally, If I restart RabbitMQ and publish a message with `x-deduplication-header=test`, the message is enqueued."},"comment":{"url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/issues/comments/436772865","html_url":"https://github.com/noxdafox/rabbitmq-message-deduplication/issues/22#issuecomment-436772865","issue_url":"https://api.github.com/repos/noxdafox/rabbitmq-message-deduplication/issues/22","id":436772865,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjc3Mjg2NQ==","user":{"login":"noxdafox","id":4214888,"node_id":"MDQ6VXNlcjQyMTQ4ODg=","avatar_url":"https://avatars2.githubusercontent.com/u/4214888?v=4","gravatar_id":"","url":"https://api.github.com/users/noxdafox","html_url":"https://github.com/noxdafox","followers_url":"https://api.github.com/users/noxdafox/followers","following_url":"https://api.github.com/users/noxdafox/following{/other_user}","gists_url":"https://api.github.com/users/noxdafox/gists{/gist_id}","starred_url":"https://api.github.com/users/noxdafox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noxdafox/subscriptions","organizations_url":"https://api.github.com/users/noxdafox/orgs","repos_url":"https://api.github.com/users/noxdafox/repos","events_url":"https://api.github.com/users/noxdafox/events{/privacy}","received_events_url":"https://api.github.com/users/noxdafox/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T20:51:57Z","updated_at":"2018-11-07T20:51:57Z","author_association":"OWNER","body":"The additional plugins should not be an issue as they are not related. I myself always use the `rabbitmq_management` plugin.\r\n\r\nI tried to reproduce the issues in several ways but with no luck.\r\n\r\nThe crash report:\r\n```\r\nCRASH REPORT Process <0.819.0> with 0 neighbours exited with reason: no function clause matching 'Elixir.RabbitMQ.MessageDeduplicationPlugin.Queue':init({amqqueue,{resource,<<\"/\">>,queue,<<\"myqueue\">>},true,false,none,[{<<\"x-message-deduplication\">>,...}],...}, new, #Fun<rabbit_amqqueue_process.11.129944743>) line 125\r\n```\r\n\r\nIndicates that when trying to call the `Elixir.RabbitMQ.MessageDeduplicationPlugin.Queue.init()` function at line [125](https://github.com/noxdafox/rabbitmq-message-deduplication/blob/master/lib/rabbit_message_deduplication_queue.ex#L125), Erlang did not find a matching function. \r\n\r\nLooking at the parameters being passed to the `init` function they seem correct: a `amqqueue` record, the atom `new` and a function callback. These are the parameters which the init function is expecting. Hence I am very confused when seeing that error.\r\n\r\nDo you think you could provide me a copy of your environment which would reproduce the issue? A Docker container for example would be perfect."}}
{"actor":{"display_login":"noxdafox"}}