Skip to content

Commit 847e820

Browse files
committed
Remove unrelated batch publish changes
1 parent f4b6417 commit 847e820

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

nats/src/nats/js/api.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323

2424

2525
class Header(str, Enum):
26-
BATCH_COMMIT = "Nats-Batch-Commit"
27-
BATCH_ID = "Nats-Batch-Id"
28-
BATCH_SEQUENCE = "Nats-Batch-Sequence"
2926
CONSUMER_STALLED = "Nats-Consumer-Stalled"
3027
DESCRIPTION = "Description"
3128
EXPECTED_LAST_MSG_ID = "Nats-Expected-Last-Msg-Id"
@@ -166,25 +163,6 @@ class PubAck(Base):
166163
seq: int
167164
domain: Optional[str] = None
168165
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
188166

189167

190168
@dataclass

0 commit comments

Comments
 (0)