|
23 | 23 |
|
24 | 24 |
|
25 | 25 | class Header(str, Enum): |
26 | | - BATCH_COMMIT = "Nats-Batch-Commit" |
27 | | - BATCH_ID = "Nats-Batch-Id" |
28 | | - BATCH_SEQUENCE = "Nats-Batch-Sequence" |
29 | 26 | CONSUMER_STALLED = "Nats-Consumer-Stalled" |
30 | 27 | DESCRIPTION = "Description" |
31 | 28 | EXPECTED_LAST_MSG_ID = "Nats-Expected-Last-Msg-Id" |
@@ -166,25 +163,6 @@ class PubAck(Base): |
166 | 163 | seq: int |
167 | 164 | domain: Optional[str] = None |
168 | 165 | duplicate: Optional[bool] = None |
169 | | - batch_id: Optional[str] = None |
170 | | - batch_size: Optional[int] = None |
171 | | - |
172 | | - @classmethod |
173 | | - def from_response(cls, resp: Dict[str, Any]) -> PubAck: |
174 | | - # Server uses ``batch``/``count`` for atomic batch publish (ADR-50). |
175 | | - if "batch" in resp and "batch_id" not in resp: |
176 | | - resp["batch_id"] = resp.pop("batch") |
177 | | - if "count" in resp and "batch_size" not in resp: |
178 | | - resp["batch_size"] = resp.pop("count") |
179 | | - return super().from_response(resp) |
180 | | - |
181 | | - def as_dict(self) -> Dict[str, object]: |
182 | | - result = super().as_dict() |
183 | | - if "batch_id" in result: |
184 | | - result["batch"] = result.pop("batch_id") |
185 | | - if "batch_size" in result: |
186 | | - result["count"] = result.pop("batch_size") |
187 | | - return result |
188 | 166 |
|
189 | 167 |
|
190 | 168 | @dataclass |
|
0 commit comments