RabbitMQ教程(三)








A
M
Q
P

h i g h

v e l
















使














使








C
d e c l a r e
)







3

  • 6















    :




    3 - 6
    channel.exchangeDeclare(exchangeName , “direct” , true) ;
    String queueName = channel . queueDeclare() .get Queue( );
    channel . queueBind (queueName , exchangeName , routingKey);























    d i r e c t






























    (







    R a b b i t M Q




    )

































    使





























    :










    C
    o
    n
    n
    e
    c
    t
    i
    o
    n








    C
    o
    n
    n
    e
    c
    t
    i
    o
    n



    C
    h
    a
    n
    n
    e
    l
















































    3 - 7







    3 - 7
    channel .exchangeDe clare (exchangeName , " direct" , true) ;
    channel . queueDeclare(queueName , true , false , false , null);
    channel . queueBind(queueName , exchangeName , routingKey) ;











































    (








    R
    a
    b
    b
    i
    t
    M
    Q




    )



    :
    C
    h
    a
    n
    n
    e
    l

    A
    P
    I












    e
    x
    c
    h
    a
    n
    g
    e
    D
    e
    c
    l
    a
    r
    e

    q
    u
    e
    u
    e
    D
    e
    c
    l
    a
    r
    e
    o

你可能感兴趣的:(RabbitMQ教程(三))