Skip to content

AMQPDataConsumer name conflicts should be handled with :shutdown #31

@lusergit

Description

@lusergit

AMQPDataConsumers now exit with :normal if they receive a :name_conflict signal from the horde registry or a {:shutdown, :process_redistribution} signal

def handle_info({:EXIT, _from, {:name_conflict, {_key, _value}, _registry, _pid}}, state) do
_ = Logger.warning("Duplicate AMQPDataConsumer shutting down")
# Exit with :normal so we're not restarted
{:stop, :normal, state}
end
def handle_info({:EXIT, _from, {:shutdown, :process_redistribution}}, state) do
_ = Logger.info("AMQPDataConsumer shutting down due to process redistribution")
# Exit with :normal so we're not restarted
{:stop, :normal, state}
end

This however does not terminate linked processes. source: elixir Supervisor documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions