sroze / messenger-enqueue-transport

Uses Enqueue with Symfony's Messenger component.
MIT License
191 stars 55 forks source link

Allow options to be passed via Symfony config, not just DSN #38

Closed Steveb-p closed 6 years ago

Steveb-p commented 6 years ago

Symfony Messenger allows passing options via... well... options array. Adapter however completely ignores them.

# Default configuration for extension with alias: "framework" at path "messenger"

# Messenger configuration
messenger:
    enabled:              false
    routing:

        # Prototype
        message_class:
            senders:              []
            send_and_handle:      false
    serializer:
        enabled:              false
        format:               json
        context:

            # Prototype
            name:                 ~
    encoder:              messenger.transport.serializer
    decoder:              messenger.transport.serializer
    transports:

        # Prototype
        name:
            dsn:                  ~
            ### This PR allows these options to be respected.
            options:              []
    default_bus:          null
    buses:

        # Prototype
        name:
            default_middleware:   true
            middleware:

                # Prototype
                -
                    id:                   ~ # Required
                    arguments:            []
Steveb-p commented 6 years ago

@makasim anything against it / opinion?