easybib/silex-qpush-provider

This package is abandoned and no longer maintained. No replacement package was suggested.

Silex service provider for uecode/qpush-bundle

1.1.1 2016-09-30 15:29 UTC

This package is not auto-updated.

Last update: 2022-05-02 14:20:34 UTC


README

Silex service provider for uecode/qpush-bundle

Setup

$app->register(new \EasyBib\QPushServiceProvider(), [
    'uecode_qpush.queue_suffix' => 'suffix', // Allows to configure suffix (e.g. environment name)
    'uecode_qpush.config' => [
        'cache' => 'my.cache.service',
        'providers' => [
            'aws' => [
                'driver' => 'aws',
                'key' => 'key',
                'secret' => 'secret',
                'region' => 'us-east-1',
            ],
        ],
        'queues' => [
            'my_queue' => [
                'provider' => 'aws',
                'callback' => [
                   'service:method',
                ],
                'options' => [
                    'logging_enabled' => true,
                    'queue_name' => 'my_queue',
                    'push_notifications' => false,
                    'message_delay' =>  0,
                    'message_timeout' => 30,
                    'message_expiration' => 604800,
                    'messages_to_receive' => 1,
                    'receive_wait_time' => 3,
                ],
            ],
        ],
    ],
]);

Local FakeSQS setup

For local setup/testing you might want to use Fake SQS as Amazon SQS replacement.

$app->register(new \EasyBib\QPushServiceProvider(), [
    'uecode_qpush.config' => [
        'providers' => [
            'fakesqs' => [
                'driver' => 'aws',
                'key' => 'fake key',
                'secret' => 'fake secret',
                'region' => 'us-east-1', // Needs to be set but won't be used
                'endpoint' => "http://localhost:4568",
            ],
        ],
    ],
]);