Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Messenger] the 'use_notify' option is on the factory, not on the postgres connection #53960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public function __construct($registry)
$this->registry = $registry;
}

/**
* @param array $options You can set 'use_notify' to false to not use LISTEN/NOTIFY with postgresql
*/
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
{
$useNotify = ($options['use_notify'] ?? true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
/**
* Uses PostgreSQL LISTEN/NOTIFY to push messages to workers.
*
* If you do not want to use the LISTEN mechanism, set the `use_notify` option to `false` when calling DoctrineTransportFactory::createTransport.
*
* @internal
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
final class PostgreSqlConnection extends Connection
{
/**
* * use_notify: Set to false to disable the use of LISTEN/NOTIFY. Default: true
* * check_delayed_interval: The interval to check for delayed messages, in milliseconds. Set to 0 to disable checks. Default: 60000 (1 minute)
* * get_notify_timeout: The length of time to wait for a response when calling PDO::pgsqlGetNotify, in milliseconds. Default: 0.
*/
protected const DEFAULT_OPTIONS = parent::DEFAULT_OPTIONS + [
'use_notify' => true,
'check_delayed_interval' => 60000,
'get_notify_timeout' => 0,
];
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.