You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inability to change the collection name in the transport in php-enque/mongodb transport using array as suggested by docs. #1027
Looking at the: \Enqueue\Mongodb\MongodbConnectionFactory::__construct I was unable to figure out how to customize the name of collection for the queue to be stored in and the documentation is wrong here.
Sending something like this doesn't work although stated by documentation as possible as it gets thrown away by the this line $config = $this->parseDsn(empty($config['dsn']) ? 'mongodb:' : $config['dsn']);.
changed the title [-]Inability to change the collection name in the transport in php-enque/mongodb transport[/-][+]Inability to change the collection name in the transport in php-enque/mongodb transport using array as suggested by docs.[/+]on Feb 21, 2020
The documentation has one more bug that eluded us for some time and fully appeared on the server.
$config = [
'dsn' => 'mongodb://127.0.0.1/' - Mongodb connection string. see http://docs.mongodb.org/manual/reference/connection-string/
'dbname' => 'enqueue', - database name.
'collection_name' => 'enqueue' - collection name
'polling_interval' => '1000', - How often query for new messages (milliseconds)
]
or
mongodb://127.0.0.1:27017/dbname?polling_interval=1000&enqueue_collection=enqueue
This suggests that dbname in first example is the same thing as dbname in the second example and code indeed tries to work with it like that. This however is not the case.
The MongoDB documentation states that it is NOT a default db, but rather defaultauthdb meaning that it is the database with credentials. On the localhost servers, we don't have database protected by authentication so it worked just fine. But in the production this adapter fails to authenticate because the dbname does not contain credentials.
So AFAIK there is no correct way to specify the database to be used. I will try to refactor and fix it along with #1031.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
[-]Inability to change the collection name in the transport in php-enque/mongodb transport[/-][+]Inability to change the collection name in the transport in php-enque/mongodb transport using array as suggested by docs.[/+]josefsabl commentedon Mar 17, 2020
The documentation has one more bug that eluded us for some time and fully appeared on the server.
This suggests that dbname in first example is the same thing as dbname in the second example and code indeed tries to work with it like that. This however is not the case.
The MongoDB documentation states that it is NOT a default db, but rather
defaultauthdbmeaning that it is the database with credentials. On the localhost servers, we don't have database protected by authentication so it worked just fine. But in the production this adapter fails to authenticate because the dbname does not contain credentials.So AFAIK there is no correct way to specify the database to be used. I will try to refactor and fix it along with #1031.
fix(mongodb): Exception throwing fatal error, Broken handling of Mong…
stale commentedon Apr 16, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.