pamqp.header
pamqp.header
AMQP Header Class Definitions
For encoding AMQP Header frames into binary AMQP stream data and decoding AMQP binary data into AMQP Header frames.
ProtocolHeader
Class that represents the AMQP Protocol Header
Source code in pamqp/header.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
__init__(major_version=constants.VERSION[0], minor_version=constants.VERSION[1], revision=constants.VERSION[2])
Construct a Protocol Header frame object for the specified AMQP version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
major_version
|
int
|
The AMQP major version ( |
VERSION[0]
|
minor_version
|
int
|
The AMQP major version ( |
VERSION[1]
|
revision
|
int
|
The AMQP major version ( |
VERSION[2]
|
Source code in pamqp/header.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
marshal()
Return the full AMQP wire protocol frame data representation of the ProtocolHeader frame.
Source code in pamqp/header.py
40 41 42 43 44 45 46 47 | |
unmarshal(data)
Dynamically decode the frame data applying the values to the method object by iterating through the attributes in order and decoding them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
The frame value to unpack |
required |
Source code in pamqp/header.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
ContentHeader
Represent a content header frame
A Content Header frame is received after a Basic.Deliver or Basic.GetOk frame and has the data and properties for the Content Body frames that follow.
Source code in pamqp/header.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
__init__(weight=0, body_size=0, properties=None)
Initialize the Exchange.DeleteOk class
Weight is unused and must be 0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
weight
|
int
|
The unused content weight field |
0
|
body_size
|
int
|
The size in bytes of the message body |
0
|
properties
|
Properties | None
|
The message properties |
None
|
Source code in pamqp/header.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
marshal()
Return the AMQP binary encoded value of the frame
Source code in pamqp/header.py
99 100 101 102 103 104 | |
unmarshal(data)
Dynamically decode the frame data applying the values to the method object by iterating through the attributes in order and decoding them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
The raw frame data to unmarshal |
required |
Source code in pamqp/header.py
106 107 108 109 110 111 112 113 114 115 116 117 | |