File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -250,4 +250,21 @@ describe AMQProxy::Server do
250
250
s.stop_accepting_clients
251
251
end
252
252
end
253
+
254
+ it " supports publishing large messages" do
255
+ s = AMQProxy ::Server .new(" 127.0.0.1" , 5672 , false )
256
+ begin
257
+ spawn { s.listen(" 127.0.0.1" , 5673 ) }
258
+ Fiber .yield
259
+ AMQP ::Client .start(" amqp://localhost:5673" ) do |conn |
260
+ ch = conn.channel
261
+ q = ch.queue
262
+ q.publish_confirm Bytes .new(10240 )
263
+ msg = q.get.not_nil!(" should not be nil" )
264
+ msg.body_io.bytesize.should eq 10240
265
+ end
266
+ ensure
267
+ s.stop_accepting_clients
268
+ end
269
+ end
253
270
end
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ module AMQProxy
242
242
else raise " Unsupported authentication mechanism: #{ start_ok.mechanism } "
243
243
end
244
244
245
- tune = AMQ ::Protocol ::Frame ::Connection ::Tune .new(frame_max: 131072 _ u32 , channel_max: UInt16 ::MAX , heartbeat: 0 _u16 )
245
+ tune = AMQ ::Protocol ::Frame ::Connection ::Tune .new(frame_max: 4096 _ u32 , channel_max: UInt16 ::MAX , heartbeat: 0 _u16 )
246
246
tune.to_io(socket, IO ::ByteFormat ::NetworkEndian )
247
247
socket.flush
248
248
You can’t perform that action at this time.
0 commit comments