jetstream-api 0.3.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {jetstream_api-0.3.0/jetstream_api.egg-info → jetstream_api-0.4.1}/PKG-INFO +49 -2
  2. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/README.md +48 -1
  3. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/__init__.py +1 -1
  4. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/admin.py +623 -98
  5. jetstream_api-0.4.1/ilink/admintopic.py +617 -0
  6. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/common.py +1039 -1035
  7. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/connectivity.py +12 -12
  8. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/exception.py +1 -1
  9. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/msg.py +12 -13
  10. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/pattern.py +10 -15
  11. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/producer.py +24 -26
  12. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/properties.py +268 -29
  13. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/qmgr.py +34 -34
  14. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/topic.py +41 -34
  15. {jetstream_api-0.3.0 → jetstream_api-0.4.1/jetstream_api.egg-info}/PKG-INFO +49 -2
  16. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/jetstream_api.egg-info/SOURCES.txt +1 -0
  17. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/pyproject.toml +1 -1
  18. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/LICENSE.txt +0 -0
  19. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/py.typed +0 -0
  20. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/ilink/util.py +0 -0
  21. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/jetstream_api.egg-info/dependency_links.txt +0 -0
  22. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/jetstream_api.egg-info/requires.txt +0 -0
  23. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/jetstream_api.egg-info/top_level.txt +0 -0
  24. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/setup.cfg +0 -0
  25. {jetstream_api-0.3.0 → jetstream_api-0.4.1}/tests/test_example.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jetstream-api
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: Python client API for iLink M.O.M. (Message Oriented Middleware)
5
5
  Author: snowjeans
6
6
  License: Boost Software License - Version 1.0 - August 17th, 2003
@@ -147,6 +147,53 @@ qmgr.reconnect() # 새 리더를 찾아 재접속
147
147
  > (`reconnect()` 직접 호출은 가능합니다). auto-commit 세션도 응답 유실 시점의 재시도로
148
148
  > **중복 put이 발생할 수 있습니다.**
149
149
 
150
+ ## 0.4.0 신규 - 관리 연결 하나로 pub/sub
151
+
152
+ `ILAdminService`(관리 포트, 보통 9998) 연결만으로 토픽 발행·구독이 가능합니다.
153
+ 큐 관리자 리스너 포트에 따로 붙지 않아도 되므로, **방화벽이 관리 포트만 열린 환경**에서
154
+ 쓸 수 있습니다.
155
+
156
+ > 엔진 v7.0.1 rev 3295 이상이 필요합니다.
157
+
158
+ ```python
159
+ from ilink.admin import ILAdminService
160
+ from ilink.exception import ILNoMsgException
161
+ from ilink.topic import ILSubscribeOptions, ILTopic
162
+
163
+ svc = ILAdminService()
164
+ svc.connect("127.0.0.1", 9998, "admin-app")
165
+ aq = svc.accessAdminQmgr("QM1")
166
+
167
+ # 발행 - (offset, timestamp, partition)
168
+ off, ts, part = aq.publish("ORDER.EVENT", b"payload", key="order-1")
169
+
170
+ # 구독
171
+ topic = aq.accessTopic("ORDER.EVENT")
172
+ sub = topic.subscribe("audit", ILSubscribeOptions()
173
+ .startMode(ILTopic.START_EARLIEST)
174
+ .commitMode(ILTopic.COMMIT_MANUAL))
175
+ try:
176
+ while True:
177
+ try:
178
+ msg = sub.read(3000)
179
+ except ILNoMsgException:
180
+ break
181
+ print(msg.get_offset(), msg.get_key(), msg.get_data_string())
182
+ sub.commit(msg)
183
+ finally:
184
+ sub.close()
185
+ ```
186
+
187
+ 패턴(와일드카드) 구독도 같은 연결로 됩니다.
188
+
189
+ ```python
190
+ ps = aq.accessPattern("ORDER.*").subscribe("audit")
191
+ ```
192
+
193
+ > **제약**: 관리 연결에는 배치가 없어 **레코드 한 건에 한 번 왕복**합니다. 멱등 발행도
194
+ > 지원되지 않습니다(acks=1 고정). 대량 처리나 중복 제거가 필요하면 리스너 포트에
195
+ > `ILQmgr` 로 붙어 `ILTopicProducer` 를 쓰세요.
196
+
150
197
  ## 0.3.0 신규 - 허브-스포크 연결 전환 헬퍼
151
198
 
152
199
  허브에 접속해 스포크를 찾고 연결을 전환하는 세 단계를 한 번에 처리하는
@@ -218,7 +265,7 @@ sub = topic.assign("app1", [0, 2], ILTopic.START_EARLIEST) # 수동 파티션
218
265
 
219
266
  ## 개발자 가이드 문서
220
267
 
221
- **공개 API 756개 전부에 한국어 docstring이 붙어 있습니다.** 편집기에서 함수 위에
268
+ **공개 API 779개 전부에 한국어 docstring이 붙어 있습니다.** 편집기에서 함수 위에
222
269
  마우스를 올리거나 `help()`로 파라미터 타입·기본값·허용값·예외를 바로 확인할 수 있습니다.
223
270
 
224
271
  ```python
@@ -101,6 +101,53 @@ qmgr.reconnect() # 새 리더를 찾아 재접속
101
101
  > (`reconnect()` 직접 호출은 가능합니다). auto-commit 세션도 응답 유실 시점의 재시도로
102
102
  > **중복 put이 발생할 수 있습니다.**
103
103
 
104
+ ## 0.4.0 신규 - 관리 연결 하나로 pub/sub
105
+
106
+ `ILAdminService`(관리 포트, 보통 9998) 연결만으로 토픽 발행·구독이 가능합니다.
107
+ 큐 관리자 리스너 포트에 따로 붙지 않아도 되므로, **방화벽이 관리 포트만 열린 환경**에서
108
+ 쓸 수 있습니다.
109
+
110
+ > 엔진 v7.0.1 rev 3295 이상이 필요합니다.
111
+
112
+ ```python
113
+ from ilink.admin import ILAdminService
114
+ from ilink.exception import ILNoMsgException
115
+ from ilink.topic import ILSubscribeOptions, ILTopic
116
+
117
+ svc = ILAdminService()
118
+ svc.connect("127.0.0.1", 9998, "admin-app")
119
+ aq = svc.accessAdminQmgr("QM1")
120
+
121
+ # 발행 - (offset, timestamp, partition)
122
+ off, ts, part = aq.publish("ORDER.EVENT", b"payload", key="order-1")
123
+
124
+ # 구독
125
+ topic = aq.accessTopic("ORDER.EVENT")
126
+ sub = topic.subscribe("audit", ILSubscribeOptions()
127
+ .startMode(ILTopic.START_EARLIEST)
128
+ .commitMode(ILTopic.COMMIT_MANUAL))
129
+ try:
130
+ while True:
131
+ try:
132
+ msg = sub.read(3000)
133
+ except ILNoMsgException:
134
+ break
135
+ print(msg.get_offset(), msg.get_key(), msg.get_data_string())
136
+ sub.commit(msg)
137
+ finally:
138
+ sub.close()
139
+ ```
140
+
141
+ 패턴(와일드카드) 구독도 같은 연결로 됩니다.
142
+
143
+ ```python
144
+ ps = aq.accessPattern("ORDER.*").subscribe("audit")
145
+ ```
146
+
147
+ > **제약**: 관리 연결에는 배치가 없어 **레코드 한 건에 한 번 왕복**합니다. 멱등 발행도
148
+ > 지원되지 않습니다(acks=1 고정). 대량 처리나 중복 제거가 필요하면 리스너 포트에
149
+ > `ILQmgr` 로 붙어 `ILTopicProducer` 를 쓰세요.
150
+
104
151
  ## 0.3.0 신규 - 허브-스포크 연결 전환 헬퍼
105
152
 
106
153
  허브에 접속해 스포크를 찾고 연결을 전환하는 세 단계를 한 번에 처리하는
@@ -172,7 +219,7 @@ sub = topic.assign("app1", [0, 2], ILTopic.START_EARLIEST) # 수동 파티션
172
219
 
173
220
  ## 개발자 가이드 문서
174
221
 
175
- **공개 API 756개 전부에 한국어 docstring이 붙어 있습니다.** 편집기에서 함수 위에
222
+ **공개 API 779개 전부에 한국어 docstring이 붙어 있습니다.** 편집기에서 함수 위에
176
223
  마우스를 올리거나 `help()`로 파라미터 타입·기본값·허용값·예외를 바로 확인할 수 있습니다.
177
224
 
178
225
  ```python
@@ -1,6 +1,6 @@
1
1
  """iLink - Python client API for iLink M.O.M. (Message Oriented Middleware)."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.4.1"
4
4
 
5
5
  # --- Admin / Service ---
6
6
  from .admin import ILAdminService, ILAdminQmgr, ILLogBrowser, ILQueueBrowser