Comments (3)
I'm not 100% sure but it has sth to do with the declaration of the queue. Can you post your config here?
hp-amqplib/issues/337
php-amqplib/php-amqplib#358
from laravel-amqp.
Hi!
apparently it seems I have the same issue, i have a consumer with this test code:
`public function handle()
{
\Amqp::consume('site', function ($message, $resolver) {
var_dump($message->body);
$resolver->acknowledge($message);
$resolver->stopWhenProcessed();
});
}`
This consumer is listening to a queue called 'site'. the plugin config is this one
`'properties' => [
'local' => [
'host' => getenv('RABBITMQ_HOST'),
'port' => getenv('RABBITMQ_PORT'),
'username' => getenv('RABBITMQ_USERNAME'),
'password' => getenv('RABBITMQ_PASSWORD'),
'vhost' => '/',
'connect_options' => [],
'ssl_options' => [],
'exchange' => getenv('RABBITMQ_EXCHANGE'),
'exchange_type' => 'topic',
'exchange_passive' => false,
'exchange_durable' => true,
'exchange_auto_delete' => false,
'exchange_internal' => false,
'exchange_nowait' => false,
'exchange_properties' => [],
'queue_force_declare' => false,
'queue_passive' => false,
'queue_durable' => true,
'queue_exclusive' => false,
'queue_auto_delete' => false,
'queue_nowait' => false,
'queue_properties' => ['x-ha-policy' => ['S', 'all']],
'consumer_tag' => '',
'consumer_no_local' => false,
'consumer_no_ack' => false,
'consumer_exclusive' => false,
'consumer_nowait' => false,
'timeout' => 0,
'persistent' => false,
],
],`
The queue has been declared from the rabbit mq admin with mostly default configuration, just set as "durable".
The consumer works fine, read and process the messages however in the last line of code, when it tries to close, i get
Call to a member function send_channel_method_frame() on null in /var/www/html/demo/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Channel/AbstractChannel.php:116
no clue about what could be causing this. any idea would be gladly appreciated
thanks!
from laravel-amqp.
found the issue by myself, its related to the amqp-lib version that was installed on my server, i updated it to the latest version and the issue was gone :).
from laravel-amqp.
Related Issues (20)
- Azure Service Bus - Support HOT 2
- Broken pipe or closed connection HOT 2
- Looking for help HOT 1
- PHP 8 support HOT 2
- AmazonMQ support HOT 1
- Target class [Amqp] does not exist. HOT 1
- Option for 'x-queue-type' HOT 1
- Configure RabbitMQ - Cluster HOT 1
- How to set initial durable for exchange HOT 1
- Non-static method 'consume' should not be called statically HOT 1
- PhpAmqpLib\Exception\AMQPInvalidFrameException: Invalid frame type 21 in /var/www/rabbit/php/app-rabbit/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Connection/AbstractConnection.php:606
- Unit Tests Schema update
- Support to set queue max length
- Wildcard Routing
- How to return the results via APi to the user when listening consume in the laravel controller HOT 1
- Publish multiple messages - Batch publish HOT 10
- [Question]open and close connections or channels every time when publish message HOT 1
- Publisher and Consumer should not be singletons HOT 2
- Consumer priority HOT 1
- Version 2.0.11 doesn't work on PHP bellow 7.4 version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-amqp.