Comments (4)
Are you waiting for the connection to be opened before sending?
from rhea.
Thanks so much for the help @grs - this appears to have been the problem.
I previously had:
// snip - set up connection
connection.connect();
sender.open();
sender.send(message);
Which appears to work somewhat - the message is sent successfully, as long as it doesn't exceed max_frame_size of the server.
I've now changed it to:
// snip - set up connection
connection.connect();
sender.open();
sender.once('sendable', () => {
sender.send(message);
});
Now it picks up the max_frame_size from the server side and splits the large message up correctly.
All that being said - I think there is a problem here. Shouldn't I be able to set the max_frame_size on the connection myself?
This test case fails for me:
const container = require('rhea');
describe('Connection Options', () => {
it('should set max_frame_size', () => {
let connection;
try {
connection = container.connect({ host: '127.0.0.1', port: 5672, max_frame_size: 1000 });
expect(connection.max_frame_size).toBe(1000);
} finally {
if (connection) {
connection.close();
}
}
});
});
I feel like if I'm not supposed to set max_frame_size on the client side, then it shouldn't be an option in the library, and if I'm allowed to set it then it should be honoured.
Again, I really appreciate the help!
from rhea.
Each side sets its max-frame-size independently. So if you set it on your connection, that is the max frame size that the broker is allowed to send to you. You cannot alter the max-frame-size the broker will accept by setting the value on your side of the connection. (If that is something that can be configured it would be configured on the broker side)
from rhea.
Ah that makes sense. Thanks again!
Perhaps it could be named something like max_receive_frame_size, or have a comment indicating this.
from rhea.
Related Issues (20)
- Regression in PR #382: Handle transfer with no payload HOT 1
- Receiver (Consumer) does not receive message that are larger than ~4.15kb HOT 3
- How can I access virtual host using rhea with TLS? HOT 13
- Does it supports OAUTH2 mechanism? HOT 2
- ulong correlation_id incorrecly serialized as uuid HOT 3
- Acknowledgments doesnt work HOT 6
- idle_time_out fires which event? HOT 15
- Publish Window Size Property HOT 2
- `NetClientConnectionOptions` and `TlsClientConnectionOptions` should be exported
- Wildcard Topics HOT 15
- loosing messages intermittently while consuming from Azure service bus HOT 1
- Is `absolute_expiry_time` in milliseconds? HOT 7
- amqp:resource-limit-exceeded ERROR HOT 1
- `sendable` event not fired after certain amount of messages HOT 1
- How to use filters dynamically ? HOT 12
- Regenerate or remove ssl certificates for examples
- Connection RabbitMQ through websocket HOT 2
- connection_detail does not support hostname HOT 5
- Issue and question - Detached receivers / draining credits HOT 9
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 rhea.