Java?????????
?????tjc123 ???????[ 2016/7/15 11:10:55 ] ??????????????????? Java
???????????£??????????????????????????????????е??
Channel channel = new Channel();
channel.queueDeclare(QUEUE_NAME?? true?? false?? false?? null);
int prefetchCount = 1;
channel.basicQos(prefetchCount);
byte[] bytes = message.getBytes("UTF-8");
channel.basicPublish(""??bytes);
?????????????Channel?????????????????????????????????????С?????Щ????£?????????
??????????????????????????????
public class Channel {
private int basicQos=0;
private AMQP.Queue queue;
public Channel()
{}
public Channel basicQos(int preCnt)
{
this.basicQos=preCnt;
return this;
}
public Channel queueDeclare(String queue?? boolean durable?? boolean exclusive?? boolean autoDelete??
Map<String?? Object> arguments)
{
this.queue=createQueue();
return this;
}
private AMQP.Queue createQueue()
{
return new AMQP.Queue();
}
public void basicPublish(String exchange??byte[] bytes)
{
//doSomething
}
}
???????????????????????????????磺
????@Test
????public void testChannel()
????{
????new Channel().basicQos(1).queueDeclare(""??true??false??false??null).basicPublish(""??new byte[]{1??3??4});
????}
??????

???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44