jetstream-api 0.6.1__tar.gz → 0.6.3__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.6.1 → jetstream_api-0.6.3}/PKG-INFO +1 -1
  2. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/__init__.py +1 -1
  3. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/properties.py +64 -4
  4. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/jetstream_api.egg-info/PKG-INFO +1 -1
  5. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/pyproject.toml +1 -1
  6. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/LICENSE.txt +0 -0
  7. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/README.md +0 -0
  8. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/admin.py +0 -0
  9. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/admintopic.py +0 -0
  10. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/common.py +0 -0
  11. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/connectivity.py +0 -0
  12. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/exception.py +0 -0
  13. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/msg.py +0 -0
  14. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/pattern.py +0 -0
  15. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/producer.py +0 -0
  16. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/py.typed +0 -0
  17. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/qmgr.py +0 -0
  18. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/topic.py +0 -0
  19. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/ilink/util.py +0 -0
  20. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/jetstream_api.egg-info/SOURCES.txt +0 -0
  21. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/jetstream_api.egg-info/dependency_links.txt +0 -0
  22. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/jetstream_api.egg-info/requires.txt +0 -0
  23. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/jetstream_api.egg-info/top_level.txt +0 -0
  24. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/setup.cfg +0 -0
  25. {jetstream_api-0.6.1 → jetstream_api-0.6.3}/tests/test_example.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jetstream-api
3
- Version: 0.6.1
3
+ Version: 0.6.3
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
@@ -1,6 +1,6 @@
1
1
  """iLink - Python client API for iLink M.O.M. (Message Oriented Middleware)."""
2
2
 
3
- __version__ = "0.6.1"
3
+ __version__ = "0.6.3"
4
4
 
5
5
  # --- Admin / Service ---
6
6
  from .admin import ILAdminService, ILAdminQmgr, ILLogBrowser, ILQueueBrowser
@@ -26,8 +26,22 @@ def _format_millis(value: int, fmt: str) -> str:
26
26
 
27
27
 
28
28
 
29
- # 구엔진(rev 3283 미만)의 StorageVolumeMonitor ForceReloadSize 기본값.
30
- LEGACY_FORCE_RELOAD_SIZE = 1048576
29
+ # 구엔진 SetVolumeMonitorForceReloadSize() 가 강제하는 하한.
30
+ LEGACY_FORCE_RELOAD_MIN = 1048576
31
+
32
+
33
+ def _has_value(raw) -> bool:
34
+ """서버가 준 원본이 쓸 만한지 본다.
35
+
36
+ 신엔진(7.0+)은 구엔진 전용 자리를 0 으로 채워 보낸다. 그 0 을 되돌려 쓰면
37
+ 안 되므로 전부 0 이면 원본이 없는 것으로 본다.
38
+ """
39
+ return bool(raw) and any(raw)
40
+
41
+
42
+ # 구엔진(6.3.x)의 TCPListener SessionPerThread 기본값.
43
+ # 0 이면 imqlsr 가 nSessionCnt / nSessionPerThread 에서 0 나눗셈으로 죽는다.
44
+ LEGACY_SESSION_PER_THREAD = 10
31
45
 
32
46
  def _spec_maxlen(n):
33
47
  """``n`` 바이트 이하 문자열 규칙."""
@@ -2479,6 +2493,8 @@ class ILQmgrProperty(_AutoAccessor):
2479
2493
  self.volumeMonitorInterval = 10
2480
2494
  self.volumeMonitorSizeLimit = 10485760
2481
2495
  self._volumeTailRaw = None
2496
+ self._sessionPerThreadRaw = None
2497
+ self._poolSizeRaw = None
2482
2498
  self.logLevelSystem = 4
2483
2499
  self.logFileSizeSystem = 4194304
2484
2500
  self.logFileCountSystem = 5
@@ -2578,6 +2594,9 @@ class ILQmgrProperty(_AutoAccessor):
2578
2594
  offset += 10
2579
2595
  self.recvWaitTimeout = ba_pick_int(ba, offset, 10)
2580
2596
  offset += 10
2597
+ # 구엔진(6.3.x)에는 실재하는 필드다. 상수로 덮으면 현장에서 조정해 둔
2598
+ # 값이 지워지므로 원본을 보관해 되돌려 쓴다(실측).
2599
+ self._poolSizeRaw = bytes(ba[offset:offset + 20])
2581
2600
  offset += 20
2582
2601
  self.volumeMonitorInterval = ba_pick_int(ba, offset, 10)
2583
2602
  offset += 10
@@ -2628,6 +2647,11 @@ class ILQmgrProperty(_AutoAccessor):
2628
2647
  offset += 2
2629
2648
  self.aclType = ba_pick_int(ba, offset, 2)
2630
2649
  offset += 2
2650
+ # v6.3.4 에서 async 를 없애며 sessionPerThread 를 뺐지만
2651
+ # **구엔진(6.3.x)에는 실재하는 필드**다. 0 을 보내면 imqlsr 가
2652
+ # nSessionCnt / nSessionPerThread 에서 죽는다(ManagerListener.h:129,
2653
+ # SIGFPE - 6.3.1 실측). 원본을 보관해 되돌려 쓴다.
2654
+ self._sessionPerThreadRaw = bytes(ba[offset:offset + 10])
2631
2655
  offset += 10
2632
2656
  self.deadLetterQueueName = ba_pick_string(ba, offset, 32)
2633
2657
  offset += 32
@@ -2692,6 +2716,17 @@ class ILQmgrProperty(_AutoAccessor):
2692
2716
  offset += 10
2693
2717
  ba_merge(self.recvWaitTimeout, ba, offset)
2694
2718
  offset += 10
2719
+ # v6.3.4 에서 async 를 없애며 acceptPoolSize/eventPoolSize 를 뺐지만
2720
+ # 구엔진(6.3.x)은 이 두 필드를 읽고 1~9 로 검증한다. 0 을 보내면
2721
+ # MIMQE_INVALID_ARGUMENT (AcceptPoolSize : 0) 로 거부된다(6.3.1 실측).
2722
+ # 다만 기본값으로 덮으면 현장에서 조정해 둔 값이 지워지므로,
2723
+ # 서버가 준 원본이 있으면 그대로 되돌려 준다(없을 때만 1/1).
2724
+ raw_pool = getattr(self, "_poolSizeRaw", None)
2725
+ if _has_value(raw_pool):
2726
+ ba[offset:offset + 20] = raw_pool
2727
+ else:
2728
+ ba_merge(1, ba, offset)
2729
+ ba_merge(1, ba, offset + 10)
2695
2730
  offset += 20
2696
2731
  ba_merge(self.volumeMonitorInterval, ba, offset)
2697
2732
  offset += 10
@@ -2738,6 +2773,8 @@ class ILQmgrProperty(_AutoAccessor):
2738
2773
  offset += 2
2739
2774
  ba_merge(self.aclType, ba, offset)
2740
2775
  offset += 2
2776
+ # 구엔진에만 있는 sessionPerThread 자리 - 0 을 보내면 큐관리자가 죽는다
2777
+ session_offset = offset
2741
2778
  offset += 10
2742
2779
  ba_merge(self.deadLetterQueueName, ba, offset)
2743
2780
  offset += 32
@@ -2753,8 +2790,17 @@ class ILQmgrProperty(_AutoAccessor):
2753
2790
  # 서버가 준 값을 그대로 되돌려 준다
2754
2791
  ba[topic_offset:topic_offset + 20] = raw
2755
2792
  else:
2756
- # 새로 만든 객체라 받은 값이 없다 - 엔진 기본값을 쓴다
2757
- ba_merge(LEGACY_FORCE_RELOAD_SIZE, ba, topic_offset)
2793
+ # 받은 값이 없다 - 엔진 생성자와 같이 sizeLimit 을 따라간다
2794
+ # (6.3 ManagerProperty.hpp:143 이 mForceReloadSize = mSizeLimit).
2795
+ # 엔진 세터가 1048576 미만을 올려 잡으므로 그 아래로 내리지 않는다.
2796
+ ba_merge(max(self.volumeMonitorSizeLimit, LEGACY_FORCE_RELOAD_MIN),
2797
+ ba, topic_offset)
2798
+ # 구엔진에만 있는 sessionPerThread 도 되돌려 준다
2799
+ raw2 = getattr(self, "_sessionPerThreadRaw", None)
2800
+ if raw2:
2801
+ ba[session_offset:session_offset + 10] = raw2
2802
+ else:
2803
+ ba_merge(LEGACY_SESSION_PER_THREAD, ba, session_offset)
2758
2804
  return bytes(ba)
2759
2805
 
2760
2806
  def get_status_string(self) -> str:
@@ -3554,6 +3600,7 @@ class ILServiceProperty(_AutoAccessor):
3554
3600
  ILException: 그 밖의 파싱 실패.
3555
3601
  """
3556
3602
  self.ip = "127.0.0.1"
3603
+ self._poolSizeRaw = None
3557
3604
  self.port = 9998
3558
3605
  self.version = ""
3559
3606
  self.timeoutSocketSend = 60
@@ -3595,6 +3642,8 @@ class ILServiceProperty(_AutoAccessor):
3595
3642
  offset += 10
3596
3643
  self.timeoutSocketRecv = ba_pick_int(ba, offset, 10)
3597
3644
  offset += 10
3645
+ # 구엔진 ilsvc 는 이 값으로 스레드 풀을 만든다 - 원본을 보관해 되돌려 쓴다
3646
+ self._poolSizeRaw = bytes(ba[offset:offset + 20])
3598
3647
  offset += 20
3599
3648
  self.logLevelSystem = ba_pick_int(ba, offset, 2)
3600
3649
  offset += 2
@@ -3649,6 +3698,17 @@ class ILServiceProperty(_AutoAccessor):
3649
3698
  offset += 10
3650
3699
  ba_merge(self.timeoutSocketRecv, ba, offset)
3651
3700
  offset += 10
3701
+ # v6.3.4 에서 async 를 없애며 acceptPoolSize/eventPoolSize 를 뺐지만
3702
+ # 구엔진(6.3.x) ilsvc 는 이 값으로 스레드 풀을 만든다
3703
+ # (ILinkServerMainClass.cpp:151, ServerListener.cpp:17). 0 이면 풀이 0개다.
3704
+ # 다만 기본값으로 덮으면 현장에서 조정해 둔 값이 지워지므로,
3705
+ # 서버가 준 원본이 있으면 그대로 되돌려 준다(없을 때만 1/1).
3706
+ raw_pool = getattr(self, "_poolSizeRaw", None)
3707
+ if _has_value(raw_pool):
3708
+ ba[offset:offset + 20] = raw_pool
3709
+ else:
3710
+ ba_merge(1, ba, offset)
3711
+ ba_merge(1, ba, offset + 10)
3652
3712
  offset += 20
3653
3713
  ba_merge(self.logLevelSystem, ba, offset)
3654
3714
  offset += 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jetstream-api
3
- Version: 0.6.1
3
+ Version: 0.6.3
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "jetstream-api"
7
- version = "0.6.1"
7
+ version = "0.6.3"
8
8
  description = "Python client API for iLink M.O.M. (Message Oriented Middleware)"
9
9
  authors = [{name = "snowjeans"}]
10
10
  readme = "README.md"
File without changes
File without changes
File without changes