snippets_py
Listener
New listener
listener = yepcode.listener.aws_sqs("yepcode-sqs-listener")
Start listener with callback message
def callback(message):
print(f"New message received: {message}")
listener.start(callback)
Start listener with callback message and on_callback_error
def callback(message):
print(f"New message received: {message}")
def on_callback_error(error, message):
print(f"Error: '{error}', processing message: {message}")
listener.start(callback, {"on_callback_error": on_callback_error})