Code Monkey home page Code Monkey logo

The options "retry_attempts", "retry_key_pattern" do not exist. Defined options are: "connection", "max_execution_time", "max_messages", "poll_interval", "queue", "requeue_on_error", "signal_handler_signals". about swarrotbundle HOT 10 CLOSED

swarrot avatar swarrot commented on June 2, 2024
The options "retry_attempts", "retry_key_pattern" do not exist. Defined options are: "connection", "max_execution_time", "max_messages", "poll_interval", "queue", "requeue_on_error", "signal_handler_signals".

from swarrotbundle.

Comments (10)

stof avatar stof commented on June 2, 2024

looks like you have not registered the RetryProcessor

from swarrotbundle.

JarJak avatar JarJak commented on June 2, 2024

I have RetryProcessor registered.

    processors_stack:
        signal_handler: 'Swarrot\Processor\SignalHandler\SignalHandlerProcessor'
        ack: 'Swarrot\Processor\Ack\AckProcessor'
        max_messages: 'Swarrot\Processor\MaxMessages\MaxMessagesProcessor'
        retry: 'Swarrot\Processor\Retry\RetryProcessor'
        exception_catcher: 'Swarrot\Processor\ExceptionCatcher\ExceptionCatcherProcessor'
        max_execution_time: 'Swarrot\Processor\MaxExecutionTime\MaxExecutionTimeProcessor'

from swarrotbundle.

odolbeau avatar odolbeau commented on June 2, 2024

Can you provide the output of this command app/console debug:config swarrot?
Thanks.

from swarrotbundle.

JarJak avatar JarJak commented on June 2, 2024
swarrot:
    provider: pecl
    default_connection: rabbitmq
    default_command: swarrot.command.base
    connections:
        rabbitmq:
            [removed]
    processors_stack:
        signal_handler: Swarrot\Processor\SignalHandler\SignalHandlerProcessor
        ack: Swarrot\Processor\Ack\AckProcessor
        max_messages: Swarrot\Processor\MaxMessages\MaxMessagesProcessor
        retry: Swarrot\Processor\Retry\RetryProcessor
        exception_catcher: Swarrot\Processor\ExceptionCatcher\ExceptionCatcherProcessor
        max_execution_time: Swarrot\Processor\MaxExecutionTime\MaxExecutionTimeProcessor
    consumers:
        inis:
            processor: inis.processor.inis
            extras:
                poll_interval: 500000
                retry_attempts: 3
                retry_key_pattern: retry_%%attempt%%
            middleware_stack:
                -
                    configurator: swarrot.processor.ack
                    first_arg_class: Swarrot\Processor\Ack\AckProcessor
                    extras:
                        poll_interval: 500000
                        retry_attempts: 3
                        retry_key_pattern: retry_%%attempt%%
                -
                    configurator: swarrot.processor.max_execution_time
                    first_arg_class: Swarrot\Processor\MaxExecutionTime\MaxExecutionTimeProcessor
                    extras:
                        poll_interval: 500000
                        retry_attempts: 3
                        retry_key_pattern: retry_%%attempt%%
                -
                    configurator: swarrot.processor.max_messages
                    first_arg_class: Swarrot\Processor\MaxMessages\MaxMessagesProcessor
                    extras:
                        poll_interval: 500000
                        retry_attempts: 3
                        retry_key_pattern: retry_%%attempt%%
                -
                    configurator: swarrot.processor.exception_catcher
                    first_arg_class: Swarrot\Processor\ExceptionCatcher\ExceptionCatcherProcessor
                    extras:
                        poll_interval: 500000
                        retry_attempts: 3
                        retry_key_pattern: retry_%%attempt%%
                -
                    configurator: swarrot.processor.retry
                    first_arg_class: Swarrot\Processor\Retry\RetryProcessor
                    extras:
                        poll_interval: 500000
                        retry_attempts: 3
                        retry_key_pattern: retry_%%attempt%%
                -
                    configurator: swarrot.processor.signal_handler
                    first_arg_class: Swarrot\Processor\SignalHandler\SignalHandlerProcessor
                    extras:
                        poll_interval: 500000
                        retry_attempts: 3
                        retry_key_pattern: retry_%%attempt%%
            command: null
            connection: null
            queue: null
    messages_types:
        inis_publisher:
            exchange: inis_send
            routing_key: inis_send
            connection: null
            extras: {  }
    logger: logger
    enable_collector: true

from swarrotbundle.

odolbeau avatar odolbeau commented on June 2, 2024

Can you also copy your config please?
I don't understand why you have extra config at swarrot.consumers.inis.extras, this configuration should be present only for the retry processor.

Just to be sure, can you also provide the output of this command: app/console debug:container --parameter=swarrot.command.base.class?

from swarrotbundle.

JarJak avatar JarJak commented on June 2, 2024

Swarrot\SwarrotBundle\Command\SwarrotCommand

from swarrotbundle.

JarJak avatar JarJak commented on June 2, 2024

Extra config comes from my config.yml:

    consumers:
        inis:
            processor: inis.processor.inis
            extras:
                poll_interval: 500000
                retry_attempts: 3
                retry_key_pattern: 'retry_%%attempt%%'

from swarrotbundle.

JarJak avatar JarJak commented on June 2, 2024

Whole config looks like this:

swarrot:
    provider: pecl # pecl or amqp_lib
    default_connection: rabbitmq
    default_command: swarrot.command.base # Swarrot\SwarrotBundle\Command\SwarrotCommand
    connections:
        rabbitmq:
            host: "%rabbitmq_host%"
            port: "%rabbitmq_port%"
            login: "%rabbitmq_user%"
            password: "%rabbitmq_password%"
            vhost: '/'
    processors_stack:
        signal_handler: 'Swarrot\Processor\SignalHandler\SignalHandlerProcessor'
        ack: 'Swarrot\Processor\Ack\AckProcessor'
        max_messages: 'Swarrot\Processor\MaxMessages\MaxMessagesProcessor'
        retry: 'Swarrot\Processor\Retry\RetryProcessor'
        exception_catcher: 'Swarrot\Processor\ExceptionCatcher\ExceptionCatcherProcessor'
        max_execution_time: 'Swarrot\Processor\MaxExecutionTime\MaxExecutionTimeProcessor'
    consumers:
        inis:
            processor: inis.processor.inis
            extras:
                poll_interval: 500000
                retry_attempts: 3
                retry_key_pattern: 'retry_%%attempt%%'
    messages_types:
        inis_publisher:
            exchange: inis_send
            routing_key: inis_send

from swarrotbundle.

JarJak avatar JarJak commented on June 2, 2024

I have rewritten my config, now it works fine:

swarrot:
    provider: pecl # pecl or amqp_lib
    default_connection: rabbitmq
    default_command: swarrot.command.base # Swarrot\SwarrotBundle\Command\SwarrotCommand
    connections:
        rabbitmq:
            host: "%rabbitmq_host%"
            port: "%rabbitmq_port%"
            login: "%rabbitmq_user%"
            password: "%rabbitmq_password%"
            vhost: '/'
    consumers:
        inis:
            processor: inis.processor.inis
            extras:
                poll_interval: 500000
            middleware_stack:
                - configurator: swarrot.processor.signal_handler
                - configurator: swarrot.processor.max_messages
                - configurator: swarrot.processor.exception_catcher
                - configurator: swarrot.processor.max_execution_time
                - configurator: swarrot.processor.ack
                -
                    configurator: swarrot.processor.retry
                    extras:
                        retry_attempts: 3
                        retry_key_pattern: 'retry_%%attempt%%'
    messages_types:
        inis_publisher:
            exchange: inis_send
            routing_key: inis_send

I see consumers are 'invisible' as they jump in only when there are messages in queue, right? How can I run a consumer with more debug info, like when it consumes a message? Even with -vvv it outputs nothing.

from swarrotbundle.

odolbeau avatar odolbeau commented on June 2, 2024

Yes, your config is way better. :)

Regarding log, it's probably linked to the config of your logger service which is used by default.
Did you configured your logger to have the console output?

You should have something like this in your config_dev file:

monolog:
    handlers:
        console:
            type: console

from swarrotbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.