View Source NameGenerator (reactive_commons v1.0.2)

This module generates unique identifiers for temporary queue names, message ids and routing keys.

Summary

Functions

Generate an hex unique random id.

Generate a new id using UUID v4 with a fixed prefix.

Generate a new id using UUID v4.

Functions

Generate an hex unique random id.

Examples

iex> NameGenerator.generate()
"fb49a0ecd60c4d2092643b4cfe272106"

Generate a new id using UUID v4 with a fixed prefix.

Examples

iex> NameGenerator.generate("sample_app")
"sample_app-fb49a0ecd60c4d2092643b4cfe272106"

Generate a new id using UUID v4.

Examples

iex> NameGenerator.message_id()
"fb49a0ec-d60c-4d20-9264-3b4cfe272106"