@geekmidas/events 9.0.2 → 10.0.0-alpha.0

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 (353) hide show
  1. package/dist/{PgBossConnection-B71ssr72.cjs → PgBossConnection-23soZ_aM.cjs} +2 -2
  2. package/dist/{PgBossConnection-B71ssr72.cjs.map → PgBossConnection-23soZ_aM.cjs.map} +1 -1
  3. package/dist/PgBossConnection-CCXhoNzb.cjs +4 -0
  4. package/dist/{PgBossConnection-Bj_Wo1lQ.mjs → PgBossConnection-DvNbd4Zk.mjs} +2 -2
  5. package/dist/{PgBossConnection-Bj_Wo1lQ.mjs.map → PgBossConnection-DvNbd4Zk.mjs.map} +1 -1
  6. package/dist/PgBossConnection-_gdM40JB.mjs +4 -0
  7. package/dist/{RabbitMQConnection-DmMMosT4.cjs → RabbitMQConnection-BKEdCUro.cjs} +2 -2
  8. package/dist/{RabbitMQConnection-DmMMosT4.cjs.map → RabbitMQConnection-BKEdCUro.cjs.map} +1 -1
  9. package/dist/RabbitMQConnection-CCOqDDnb.cjs +4 -0
  10. package/dist/RabbitMQConnection-DJEyM-Bu.mjs +4 -0
  11. package/dist/{RabbitMQConnection-BtKZjtZY.mjs → RabbitMQConnection-DJgUPc19.mjs} +2 -2
  12. package/dist/{RabbitMQConnection-BtKZjtZY.mjs.map → RabbitMQConnection-DJgUPc19.mjs.map} +1 -1
  13. package/dist/{SNSConnection-CAcbLQOy.cjs → SNSConnection-B2K86hpz.cjs} +7 -8
  14. package/dist/SNSConnection-B2K86hpz.cjs.map +1 -0
  15. package/dist/SNSConnection-BVo84FeW.mjs +5 -0
  16. package/dist/SNSConnection-DIHRjrQF.cjs +5 -0
  17. package/dist/{SNSConnection-CVjH93lb.mjs → SNSConnection-v9jjF99w.mjs} +7 -8
  18. package/dist/SNSConnection-v9jjF99w.mjs.map +1 -0
  19. package/dist/{SQSConnection-CT3S7_zP.mjs → SQSConnection-4tBMkVZE.mjs} +7 -8
  20. package/dist/SQSConnection-4tBMkVZE.mjs.map +1 -0
  21. package/dist/SQSConnection-BBLAvF-1.cjs +5 -0
  22. package/dist/{SQSConnection-Y0mdVTcB.cjs → SQSConnection-BaC7rGhI.cjs} +7 -8
  23. package/dist/SQSConnection-BaC7rGhI.cjs.map +1 -0
  24. package/dist/SQSConnection-DbavOq8_.mjs +5 -0
  25. package/dist/{SQSSubscriber-CQdSFzpe.mjs → SQSSubscriber-BMWZ3s5q.mjs} +1 -1
  26. package/dist/{SQSSubscriber-CQdSFzpe.mjs.map → SQSSubscriber-BMWZ3s5q.mjs.map} +1 -1
  27. package/dist/{SQSSubscriber-C4UA2hKq.cjs → SQSSubscriber-YXPlg2rm.cjs} +2 -2
  28. package/dist/{SQSSubscriber-C4UA2hKq.cjs.map → SQSSubscriber-YXPlg2rm.cjs.map} +1 -1
  29. package/dist/basic/index.cjs +71 -8
  30. package/dist/basic/index.cjs.map +1 -0
  31. package/dist/basic/index.d.cts +44 -5
  32. package/dist/basic/index.d.cts.map +1 -0
  33. package/dist/basic/index.d.mts +44 -5
  34. package/dist/basic/index.d.mts.map +1 -0
  35. package/dist/basic/index.mjs +67 -5
  36. package/dist/basic/index.mjs.map +1 -0
  37. package/dist/chunk-B9dir_RE.mjs +11 -0
  38. package/dist/{chunk-CUT6urMc.cjs → chunk-CsX-DzYB.cjs} +12 -0
  39. package/dist/index.cjs +189 -6
  40. package/dist/index.cjs.map +1 -0
  41. package/dist/index.d.cts +46 -5
  42. package/dist/index.d.cts.map +1 -0
  43. package/dist/index.d.mts +46 -5
  44. package/dist/index.d.mts.map +1 -0
  45. package/dist/index.mjs +188 -5
  46. package/dist/index.mjs.map +1 -0
  47. package/dist/pgboss/index.cjs +81 -5
  48. package/dist/pgboss/index.cjs.map +1 -0
  49. package/dist/pgboss/index.d.cts +65 -5
  50. package/dist/pgboss/index.d.cts.map +1 -0
  51. package/dist/pgboss/index.d.mts +65 -5
  52. package/dist/pgboss/index.d.mts.map +1 -0
  53. package/dist/pgboss/index.mjs +81 -5
  54. package/dist/pgboss/index.mjs.map +1 -0
  55. package/dist/rabbitmq/index.cjs +95 -5
  56. package/dist/rabbitmq/index.cjs.map +1 -0
  57. package/dist/rabbitmq/index.d.cts +83 -5
  58. package/dist/rabbitmq/index.d.cts.map +1 -0
  59. package/dist/rabbitmq/index.d.mts +83 -5
  60. package/dist/rabbitmq/index.d.mts.map +1 -0
  61. package/dist/rabbitmq/index.mjs +95 -5
  62. package/dist/rabbitmq/index.mjs.map +1 -0
  63. package/dist/sns/index.cjs +186 -7
  64. package/dist/sns/index.cjs.map +1 -0
  65. package/dist/sns/index.d.cts +109 -5
  66. package/dist/sns/index.d.cts.map +1 -0
  67. package/dist/sns/index.d.mts +109 -5
  68. package/dist/sns/index.d.mts.map +1 -0
  69. package/dist/sns/index.mjs +179 -7
  70. package/dist/sns/index.mjs.map +1 -0
  71. package/dist/sns/snsUrl.cjs +7 -0
  72. package/dist/sns/snsUrl.d.cts +2 -0
  73. package/dist/sns/snsUrl.d.mts +2 -0
  74. package/dist/sns/snsUrl.mjs +3 -0
  75. package/dist/snsUrl-ASdc0D1v.d.cts +61 -0
  76. package/dist/snsUrl-ASdc0D1v.d.cts.map +1 -0
  77. package/dist/snsUrl-CifYhPAa.mjs +79 -0
  78. package/dist/snsUrl-CifYhPAa.mjs.map +1 -0
  79. package/dist/snsUrl-FRbRcwF0.d.mts +61 -0
  80. package/dist/snsUrl-FRbRcwF0.d.mts.map +1 -0
  81. package/dist/snsUrl-f2gU3CzK.cjs +114 -0
  82. package/dist/snsUrl-f2gU3CzK.cjs.map +1 -0
  83. package/dist/sqs/index.cjs +67 -5
  84. package/dist/sqs/index.cjs.map +1 -0
  85. package/dist/sqs/index.d.cts +101 -5
  86. package/dist/sqs/index.d.cts.map +1 -0
  87. package/dist/sqs/index.d.mts +101 -5
  88. package/dist/sqs/index.d.mts.map +1 -0
  89. package/dist/sqs/index.mjs +60 -5
  90. package/dist/sqs/index.mjs.map +1 -0
  91. package/dist/sqs/sqsUrl.cjs +7 -0
  92. package/dist/sqs/sqsUrl.d.cts +2 -0
  93. package/dist/sqs/sqsUrl.d.mts +2 -0
  94. package/dist/sqs/sqsUrl.mjs +3 -0
  95. package/dist/sqsUrl-BV6zS-mi.d.mts +60 -0
  96. package/dist/sqsUrl-BV6zS-mi.d.mts.map +1 -0
  97. package/dist/sqsUrl-CbAsBFHI.mjs +80 -0
  98. package/dist/sqsUrl-CbAsBFHI.mjs.map +1 -0
  99. package/dist/sqsUrl-CdisN3GU.cjs +115 -0
  100. package/dist/sqsUrl-CdisN3GU.cjs.map +1 -0
  101. package/dist/sqsUrl-DZDPHxIk.d.cts +60 -0
  102. package/dist/sqsUrl-DZDPHxIk.d.cts.map +1 -0
  103. package/dist/{types-Dh9Jyinx.d.mts → types-BmixGrOD.d.cts} +1 -1
  104. package/dist/{types-Dh9Jyinx.d.mts.map → types-BmixGrOD.d.cts.map} +1 -1
  105. package/dist/{types-BrdcSEnd.mjs → types-CYDt-2RQ.mjs} +1 -1
  106. package/dist/{types-BrdcSEnd.mjs.map → types-CYDt-2RQ.mjs.map} +1 -1
  107. package/dist/{types-Dj23od3e.d.cts → types-DycjsYms.d.mts} +1 -1
  108. package/dist/{types-Dj23od3e.d.cts.map → types-DycjsYms.d.mts.map} +1 -1
  109. package/package.json +26 -3
  110. package/CHANGELOG.md +0 -109
  111. package/dist/BasicConnection-CQsJpx2J.d.cts +0 -27
  112. package/dist/BasicConnection-CQsJpx2J.d.cts.map +0 -1
  113. package/dist/BasicConnection-CxfNEvlb.cjs +0 -48
  114. package/dist/BasicConnection-CxfNEvlb.cjs.map +0 -1
  115. package/dist/BasicConnection-DcRelT64.d.mts +0 -27
  116. package/dist/BasicConnection-DcRelT64.d.mts.map +0 -1
  117. package/dist/BasicConnection-hl-Ogz3a.mjs +0 -42
  118. package/dist/BasicConnection-hl-Ogz3a.mjs.map +0 -1
  119. package/dist/BasicPublisher-C-hMX2Hy.d.mts +0 -14
  120. package/dist/BasicPublisher-C-hMX2Hy.d.mts.map +0 -1
  121. package/dist/BasicPublisher-CGMXg2I2.d.cts +0 -14
  122. package/dist/BasicPublisher-CGMXg2I2.d.cts.map +0 -1
  123. package/dist/BasicPublisher-CXAVKxgq.cjs +0 -20
  124. package/dist/BasicPublisher-CXAVKxgq.cjs.map +0 -1
  125. package/dist/BasicPublisher-DogbeHAH.mjs +0 -14
  126. package/dist/BasicPublisher-DogbeHAH.mjs.map +0 -1
  127. package/dist/BasicSubscriber-BJSZN22M.mjs +0 -16
  128. package/dist/BasicSubscriber-BJSZN22M.mjs.map +0 -1
  129. package/dist/BasicSubscriber-HzSJ_MbB.d.mts +0 -14
  130. package/dist/BasicSubscriber-HzSJ_MbB.d.mts.map +0 -1
  131. package/dist/BasicSubscriber-mVJRMXhZ.cjs +0 -22
  132. package/dist/BasicSubscriber-mVJRMXhZ.cjs.map +0 -1
  133. package/dist/BasicSubscriber-uW3IOyBj.d.cts +0 -14
  134. package/dist/BasicSubscriber-uW3IOyBj.d.cts.map +0 -1
  135. package/dist/EventConnection-4niMI6D8.d.mts +0 -13
  136. package/dist/EventConnection-4niMI6D8.d.mts.map +0 -1
  137. package/dist/EventConnection-BkA9FSVL.cjs +0 -45
  138. package/dist/EventConnection-BkA9FSVL.cjs.map +0 -1
  139. package/dist/EventConnection-Kr32GAzq.mjs +0 -40
  140. package/dist/EventConnection-Kr32GAzq.mjs.map +0 -1
  141. package/dist/EventConnection-dP42P87q.d.cts +0 -13
  142. package/dist/EventConnection-dP42P87q.d.cts.map +0 -1
  143. package/dist/EventConnection.cjs +0 -5
  144. package/dist/EventConnection.d.cts +0 -3
  145. package/dist/EventConnection.d.mts +0 -3
  146. package/dist/EventConnection.mjs +0 -4
  147. package/dist/PgBossConnection-DCfLGoHx.d.mts +0 -32
  148. package/dist/PgBossConnection-DCfLGoHx.d.mts.map +0 -1
  149. package/dist/PgBossConnection-oto_CAbP.d.cts +0 -32
  150. package/dist/PgBossConnection-oto_CAbP.d.cts.map +0 -1
  151. package/dist/PgBossPublisher-Bwo7qSoH.mjs +0 -35
  152. package/dist/PgBossPublisher-Bwo7qSoH.mjs.map +0 -1
  153. package/dist/PgBossPublisher-CqjigBVC.d.mts +0 -20
  154. package/dist/PgBossPublisher-CqjigBVC.d.mts.map +0 -1
  155. package/dist/PgBossPublisher-FTdYh58W.cjs +0 -41
  156. package/dist/PgBossPublisher-FTdYh58W.cjs.map +0 -1
  157. package/dist/PgBossPublisher-JIiB1zpA.d.cts +0 -20
  158. package/dist/PgBossPublisher-JIiB1zpA.d.cts.map +0 -1
  159. package/dist/PgBossSubscriber-BUiB1JKf.d.mts +0 -24
  160. package/dist/PgBossSubscriber-BUiB1JKf.d.mts.map +0 -1
  161. package/dist/PgBossSubscriber-BubVfuWm.cjs +0 -52
  162. package/dist/PgBossSubscriber-BubVfuWm.cjs.map +0 -1
  163. package/dist/PgBossSubscriber-Cozijfdj.d.cts +0 -24
  164. package/dist/PgBossSubscriber-Cozijfdj.d.cts.map +0 -1
  165. package/dist/PgBossSubscriber-DopATe80.mjs +0 -46
  166. package/dist/PgBossSubscriber-DopATe80.mjs.map +0 -1
  167. package/dist/Publisher-CKloIGh6.cjs +0 -79
  168. package/dist/Publisher-CKloIGh6.cjs.map +0 -1
  169. package/dist/Publisher-ChLTrUeP.mjs +0 -74
  170. package/dist/Publisher-ChLTrUeP.mjs.map +0 -1
  171. package/dist/Publisher-DDee6xau.d.cts +0 -21
  172. package/dist/Publisher-DDee6xau.d.cts.map +0 -1
  173. package/dist/Publisher-VHumMkrP.d.mts +0 -21
  174. package/dist/Publisher-VHumMkrP.d.mts.map +0 -1
  175. package/dist/Publisher.cjs +0 -4
  176. package/dist/Publisher.d.cts +0 -3
  177. package/dist/Publisher.d.mts +0 -3
  178. package/dist/Publisher.mjs +0 -4
  179. package/dist/RabbitMQConnection-DV9t3VYp.d.mts +0 -44
  180. package/dist/RabbitMQConnection-DV9t3VYp.d.mts.map +0 -1
  181. package/dist/RabbitMQConnection-jNME_eR7.d.cts +0 -44
  182. package/dist/RabbitMQConnection-jNME_eR7.d.cts.map +0 -1
  183. package/dist/RabbitMQPublisher-C94q6g8q.cjs +0 -45
  184. package/dist/RabbitMQPublisher-C94q6g8q.cjs.map +0 -1
  185. package/dist/RabbitMQPublisher-DKmgwqVj.d.mts +0 -25
  186. package/dist/RabbitMQPublisher-DKmgwqVj.d.mts.map +0 -1
  187. package/dist/RabbitMQPublisher-d257OHLa.d.cts +0 -25
  188. package/dist/RabbitMQPublisher-d257OHLa.d.cts.map +0 -1
  189. package/dist/RabbitMQPublisher-yUqWNq-P.mjs +0 -39
  190. package/dist/RabbitMQPublisher-yUqWNq-P.mjs.map +0 -1
  191. package/dist/RabbitMQSubscriber-BF7JGfYm.d.cts +0 -27
  192. package/dist/RabbitMQSubscriber-BF7JGfYm.d.cts.map +0 -1
  193. package/dist/RabbitMQSubscriber-BWniDtFs.mjs +0 -56
  194. package/dist/RabbitMQSubscriber-BWniDtFs.mjs.map +0 -1
  195. package/dist/RabbitMQSubscriber-CdbUy5mB.d.mts +0 -27
  196. package/dist/RabbitMQSubscriber-CdbUy5mB.d.mts.map +0 -1
  197. package/dist/RabbitMQSubscriber-DGEO-clQ.cjs +0 -62
  198. package/dist/RabbitMQSubscriber-DGEO-clQ.cjs.map +0 -1
  199. package/dist/SNSConnection-CAcbLQOy.cjs.map +0 -1
  200. package/dist/SNSConnection-CG4iEwA8.d.mts +0 -41
  201. package/dist/SNSConnection-CG4iEwA8.d.mts.map +0 -1
  202. package/dist/SNSConnection-CVjH93lb.mjs.map +0 -1
  203. package/dist/SNSConnection-Dol9FuxA.d.cts +0 -41
  204. package/dist/SNSConnection-Dol9FuxA.d.cts.map +0 -1
  205. package/dist/SNSPublisher-CjlMS3Z2.mjs +0 -41
  206. package/dist/SNSPublisher-CjlMS3Z2.mjs.map +0 -1
  207. package/dist/SNSPublisher-D50dPCEh.d.mts +0 -22
  208. package/dist/SNSPublisher-D50dPCEh.d.mts.map +0 -1
  209. package/dist/SNSPublisher-DQunY4NM.d.cts +0 -22
  210. package/dist/SNSPublisher-DQunY4NM.d.cts.map +0 -1
  211. package/dist/SNSPublisher-DV_8GGsi.cjs +0 -47
  212. package/dist/SNSPublisher-DV_8GGsi.cjs.map +0 -1
  213. package/dist/SNSSubscriber-BWaCQFl6.mjs +0 -139
  214. package/dist/SNSSubscriber-BWaCQFl6.mjs.map +0 -1
  215. package/dist/SNSSubscriber-CUgHK4W2.d.mts +0 -55
  216. package/dist/SNSSubscriber-CUgHK4W2.d.mts.map +0 -1
  217. package/dist/SNSSubscriber-ZE_-Hsps.cjs +0 -145
  218. package/dist/SNSSubscriber-ZE_-Hsps.cjs.map +0 -1
  219. package/dist/SNSSubscriber-ZGJjhXFQ.d.cts +0 -55
  220. package/dist/SNSSubscriber-ZGJjhXFQ.d.cts.map +0 -1
  221. package/dist/SQSConnection-BtEkDha8.d.cts +0 -41
  222. package/dist/SQSConnection-BtEkDha8.d.cts.map +0 -1
  223. package/dist/SQSConnection-CT3S7_zP.mjs.map +0 -1
  224. package/dist/SQSConnection-DVy43GCV.d.mts +0 -41
  225. package/dist/SQSConnection-DVy43GCV.d.mts.map +0 -1
  226. package/dist/SQSConnection-Y0mdVTcB.cjs.map +0 -1
  227. package/dist/SQSPublisher-B-32CC4G.mjs +0 -57
  228. package/dist/SQSPublisher-B-32CC4G.mjs.map +0 -1
  229. package/dist/SQSPublisher-CgUduk6H.cjs +0 -63
  230. package/dist/SQSPublisher-CgUduk6H.cjs.map +0 -1
  231. package/dist/SQSPublisher-kyl5HW3N.d.cts +0 -25
  232. package/dist/SQSPublisher-kyl5HW3N.d.cts.map +0 -1
  233. package/dist/SQSPublisher-qDE5Fp-N.d.mts +0 -25
  234. package/dist/SQSPublisher-qDE5Fp-N.d.mts.map +0 -1
  235. package/dist/SQSSubscriber-CDvaG4ij.d.cts +0 -44
  236. package/dist/SQSSubscriber-CDvaG4ij.d.cts.map +0 -1
  237. package/dist/SQSSubscriber-JfFuAAoP.d.mts +0 -44
  238. package/dist/SQSSubscriber-JfFuAAoP.d.mts.map +0 -1
  239. package/dist/Subscriber-CG_QUQZs.d.cts +0 -21
  240. package/dist/Subscriber-CG_QUQZs.d.cts.map +0 -1
  241. package/dist/Subscriber-CghW0A02.cjs +0 -88
  242. package/dist/Subscriber-CghW0A02.cjs.map +0 -1
  243. package/dist/Subscriber-DiYHmuF0.d.mts +0 -21
  244. package/dist/Subscriber-DiYHmuF0.d.mts.map +0 -1
  245. package/dist/Subscriber-bnkFtSvt.mjs +0 -83
  246. package/dist/Subscriber-bnkFtSvt.mjs.map +0 -1
  247. package/dist/Subscriber.cjs +0 -4
  248. package/dist/Subscriber.d.cts +0 -3
  249. package/dist/Subscriber.d.mts +0 -3
  250. package/dist/Subscriber.mjs +0 -4
  251. package/dist/basic/BasicConnection.cjs +0 -4
  252. package/dist/basic/BasicConnection.d.cts +0 -3
  253. package/dist/basic/BasicConnection.d.mts +0 -3
  254. package/dist/basic/BasicConnection.mjs +0 -4
  255. package/dist/basic/BasicPublisher.cjs +0 -3
  256. package/dist/basic/BasicPublisher.d.cts +0 -4
  257. package/dist/basic/BasicPublisher.d.mts +0 -4
  258. package/dist/basic/BasicPublisher.mjs +0 -3
  259. package/dist/basic/BasicSubscriber.cjs +0 -3
  260. package/dist/basic/BasicSubscriber.d.cts +0 -4
  261. package/dist/basic/BasicSubscriber.d.mts +0 -4
  262. package/dist/basic/BasicSubscriber.mjs +0 -3
  263. package/dist/pgboss/PgBossConnection.cjs +0 -4
  264. package/dist/pgboss/PgBossConnection.d.cts +0 -3
  265. package/dist/pgboss/PgBossConnection.d.mts +0 -3
  266. package/dist/pgboss/PgBossConnection.mjs +0 -4
  267. package/dist/pgboss/PgBossPublisher.cjs +0 -3
  268. package/dist/pgboss/PgBossPublisher.d.cts +0 -4
  269. package/dist/pgboss/PgBossPublisher.d.mts +0 -4
  270. package/dist/pgboss/PgBossPublisher.mjs +0 -3
  271. package/dist/pgboss/PgBossSubscriber.cjs +0 -3
  272. package/dist/pgboss/PgBossSubscriber.d.cts +0 -4
  273. package/dist/pgboss/PgBossSubscriber.d.mts +0 -4
  274. package/dist/pgboss/PgBossSubscriber.mjs +0 -3
  275. package/dist/rabbitmq/RabbitMQConnection.cjs +0 -4
  276. package/dist/rabbitmq/RabbitMQConnection.d.cts +0 -3
  277. package/dist/rabbitmq/RabbitMQConnection.d.mts +0 -3
  278. package/dist/rabbitmq/RabbitMQConnection.mjs +0 -4
  279. package/dist/rabbitmq/RabbitMQPublisher.cjs +0 -3
  280. package/dist/rabbitmq/RabbitMQPublisher.d.cts +0 -4
  281. package/dist/rabbitmq/RabbitMQPublisher.d.mts +0 -4
  282. package/dist/rabbitmq/RabbitMQPublisher.mjs +0 -3
  283. package/dist/rabbitmq/RabbitMQSubscriber.cjs +0 -3
  284. package/dist/rabbitmq/RabbitMQSubscriber.d.cts +0 -4
  285. package/dist/rabbitmq/RabbitMQSubscriber.d.mts +0 -4
  286. package/dist/rabbitmq/RabbitMQSubscriber.mjs +0 -3
  287. package/dist/sns/SNSConnection.cjs +0 -4
  288. package/dist/sns/SNSConnection.d.cts +0 -3
  289. package/dist/sns/SNSConnection.d.mts +0 -3
  290. package/dist/sns/SNSConnection.mjs +0 -4
  291. package/dist/sns/SNSPublisher.cjs +0 -3
  292. package/dist/sns/SNSPublisher.d.cts +0 -4
  293. package/dist/sns/SNSPublisher.d.mts +0 -4
  294. package/dist/sns/SNSPublisher.mjs +0 -3
  295. package/dist/sns/SNSSubscriber.cjs +0 -6
  296. package/dist/sns/SNSSubscriber.d.cts +0 -4
  297. package/dist/sns/SNSSubscriber.d.mts +0 -4
  298. package/dist/sns/SNSSubscriber.mjs +0 -6
  299. package/dist/sqs/SQSConnection.cjs +0 -4
  300. package/dist/sqs/SQSConnection.d.cts +0 -3
  301. package/dist/sqs/SQSConnection.d.mts +0 -3
  302. package/dist/sqs/SQSConnection.mjs +0 -4
  303. package/dist/sqs/SQSPublisher.cjs +0 -3
  304. package/dist/sqs/SQSPublisher.d.cts +0 -4
  305. package/dist/sqs/SQSPublisher.d.mts +0 -4
  306. package/dist/sqs/SQSPublisher.mjs +0 -3
  307. package/dist/sqs/SQSSubscriber.cjs +0 -3
  308. package/dist/sqs/SQSSubscriber.d.cts +0 -4
  309. package/dist/sqs/SQSSubscriber.d.mts +0 -4
  310. package/dist/sqs/SQSSubscriber.mjs +0 -3
  311. package/dist/types.cjs +0 -3
  312. package/dist/types.d.cts +0 -2
  313. package/dist/types.d.mts +0 -2
  314. package/dist/types.mjs +0 -3
  315. package/src/EventConnection.ts +0 -43
  316. package/src/Publisher.ts +0 -98
  317. package/src/Subscriber.ts +0 -113
  318. package/src/__tests__/EventConnection.spec.ts +0 -42
  319. package/src/__tests__/Publisher.spec.ts +0 -96
  320. package/src/__tests__/Subscriber.spec.ts +0 -109
  321. package/src/basic/BasicConnection.ts +0 -47
  322. package/src/basic/BasicPublisher.ts +0 -15
  323. package/src/basic/BasicSubscriber.ts +0 -21
  324. package/src/basic/__tests__/BasicSubscriber.spec.ts +0 -166
  325. package/src/basic/index.ts +0 -3
  326. package/src/index.ts +0 -25
  327. package/src/pgboss/PgBossConnection.ts +0 -91
  328. package/src/pgboss/PgBossPublisher.ts +0 -49
  329. package/src/pgboss/PgBossSubscriber.ts +0 -81
  330. package/src/pgboss/__tests__/pgboss.spec.ts +0 -196
  331. package/src/pgboss/__tests__/setup.ts +0 -21
  332. package/src/pgboss/index.ts +0 -5
  333. package/src/rabbitmq/RabbitMQConnection.ts +0 -148
  334. package/src/rabbitmq/RabbitMQPublisher.ts +0 -67
  335. package/src/rabbitmq/RabbitMQSubscriber.ts +0 -111
  336. package/src/rabbitmq/__tests__/RabbitMQPublisher.spec.ts +0 -378
  337. package/src/rabbitmq/__tests__/RabbitMQSubscriber.spec.ts +0 -292
  338. package/src/rabbitmq/index.ts +0 -6
  339. package/src/sns/SNSConnection.ts +0 -98
  340. package/src/sns/SNSPublisher.ts +0 -62
  341. package/src/sns/SNSSubscriber.ts +0 -218
  342. package/src/sns/__tests__/SNS-SQS-Integration.spec.ts +0 -389
  343. package/src/sns/__tests__/SNSPublisher.spec.ts +0 -449
  344. package/src/sns/__tests__/SNSSubscriber.spec.ts +0 -527
  345. package/src/sns/index.ts +0 -6
  346. package/src/sqs/SQSConnection.ts +0 -97
  347. package/src/sqs/SQSPublisher.ts +0 -105
  348. package/src/sqs/SQSSubscriber.ts +0 -181
  349. package/src/sqs/__tests__/SQSPublisher.spec.ts +0 -189
  350. package/src/sqs/index.ts +0 -6
  351. package/src/types.ts +0 -76
  352. package/tsconfig.json +0 -9
  353. package/tsdown.config.ts +0 -10
@@ -1,378 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import type { PublishableMessage } from '../../types';
3
- import { RabbitMQConnection } from '../RabbitMQConnection';
4
- import { RabbitMQPublisher } from '../RabbitMQPublisher';
5
-
6
- type TestMessage = PublishableMessage<'user.created' | 'user.updated', any>;
7
-
8
- const RABBITMQ_URL = 'amqp://geekmidas:geekmidas@localhost:5672';
9
-
10
- // Helper to generate unique exchange names
11
- const uniqueExchange = () =>
12
- `test-exchange-${Date.now()}-${Math.random().toString(36).substring(7)}`;
13
-
14
- describe('RabbitMQPublisher - Integration Tests', () => {
15
- describe('constructor', () => {
16
- it('should create instance with default configuration', () => {
17
- const connection = new RabbitMQConnection({
18
- url: RABBITMQ_URL,
19
- exchange: uniqueExchange(),
20
- });
21
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
22
-
23
- expect(publisher).toBeDefined();
24
- });
25
-
26
- it('should connect lazily on first publish', async () => {
27
- const testExchange = uniqueExchange();
28
- const connection = new RabbitMQConnection({
29
- url: RABBITMQ_URL,
30
- exchange: testExchange,
31
- });
32
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
33
-
34
- // Should not throw - connection happens on publish
35
- await publisher.publish([
36
- { type: 'user.created', payload: { userId: 'test' } },
37
- ]);
38
-
39
- await connection.close();
40
- });
41
-
42
- it('should work with custom exchange type', async () => {
43
- const testExchange = uniqueExchange();
44
- const connection = new RabbitMQConnection({
45
- url: RABBITMQ_URL,
46
- exchange: testExchange,
47
- exchangeType: 'direct',
48
- });
49
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
50
-
51
- await publisher.publish([
52
- { type: 'user.created', payload: { userId: 'test' } },
53
- ]);
54
-
55
- await connection.close();
56
- });
57
-
58
- it('should apply custom timeout', async () => {
59
- const testExchange = uniqueExchange();
60
- const connection = new RabbitMQConnection({
61
- url: RABBITMQ_URL,
62
- exchange: testExchange,
63
- timeout: 10000,
64
- });
65
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
66
-
67
- await publisher.publish([
68
- { type: 'user.created', payload: { userId: 'test' } },
69
- ]);
70
-
71
- await connection.close();
72
- });
73
- });
74
-
75
- describe('fromConnectionString', () => {
76
- it('should parse basic connection string with autoConnect=true', async () => {
77
- const testExchange = uniqueExchange();
78
- const publisher =
79
- await RabbitMQPublisher.fromConnectionString<TestMessage>(
80
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}&autoConnect=true`,
81
- );
82
-
83
- // Should already be connected
84
- await publisher.publish([
85
- { type: 'user.created', payload: { userId: 'test' } },
86
- ]);
87
-
88
- await publisher.close();
89
- });
90
-
91
- it('should parse connection string with custom exchange', async () => {
92
- const testExchange = uniqueExchange();
93
- const publisher =
94
- await RabbitMQPublisher.fromConnectionString<TestMessage>(
95
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}&autoConnect=true`,
96
- );
97
-
98
- await publisher.publish([
99
- { type: 'user.created', payload: { userId: 'test' } },
100
- ]);
101
-
102
- await publisher.close();
103
- });
104
-
105
- it('should parse connection string with type parameter', async () => {
106
- const testExchange = uniqueExchange();
107
- const publisher =
108
- await RabbitMQPublisher.fromConnectionString<TestMessage>(
109
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}&type=fanout&autoConnect=true`,
110
- );
111
-
112
- await publisher.publish([
113
- { type: 'user.created', payload: { userId: 'test' } },
114
- ]);
115
-
116
- await publisher.close();
117
- });
118
-
119
- it('should parse connection string with timeout parameter', async () => {
120
- const testExchange = uniqueExchange();
121
- const publisher =
122
- await RabbitMQPublisher.fromConnectionString<TestMessage>(
123
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}&autoConnect=true&timeout=10000`,
124
- );
125
-
126
- await publisher.publish([
127
- { type: 'user.created', payload: { userId: 'test' } },
128
- ]);
129
-
130
- await publisher.close();
131
- });
132
-
133
- it('should not auto-connect by default', async () => {
134
- const testExchange = uniqueExchange();
135
- const publisher =
136
- await RabbitMQPublisher.fromConnectionString<TestMessage>(
137
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}`,
138
- );
139
-
140
- // Should connect lazily on publish
141
- await publisher.publish([
142
- { type: 'user.created', payload: { userId: 'test' } },
143
- ]);
144
-
145
- await publisher.close();
146
- });
147
-
148
- it('should respect autoConnect=false', async () => {
149
- const testExchange = uniqueExchange();
150
- const publisher =
151
- await RabbitMQPublisher.fromConnectionString<TestMessage>(
152
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}&autoConnect=false`,
153
- );
154
-
155
- // Should connect lazily on publish
156
- await publisher.publish([
157
- { type: 'user.created', payload: { userId: 'test' } },
158
- ]);
159
-
160
- await publisher.close();
161
- });
162
- });
163
-
164
- describe('publish', () => {
165
- it('should publish single message successfully', async () => {
166
- const testExchange = uniqueExchange();
167
- const connection = new RabbitMQConnection({
168
- url: RABBITMQ_URL,
169
- exchange: testExchange,
170
- });
171
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
172
-
173
- const messages: TestMessage[] = [
174
- {
175
- type: 'user.created',
176
- payload: { userId: '123', email: 'test@example.com' },
177
- },
178
- ];
179
-
180
- await publisher.publish(messages);
181
- await connection.close();
182
- });
183
-
184
- it('should publish multiple messages with different routing keys', async () => {
185
- const testExchange = uniqueExchange();
186
- const connection = new RabbitMQConnection({
187
- url: RABBITMQ_URL,
188
- exchange: testExchange,
189
- });
190
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
191
-
192
- const messages: TestMessage[] = [
193
- { type: 'user.created', payload: { userId: '1' } },
194
- { type: 'user.updated', payload: { userId: '2' } },
195
- { type: 'user.created', payload: { userId: '3' } },
196
- { type: 'user.updated', payload: { userId: '4' } },
197
- ];
198
-
199
- await publisher.publish(messages);
200
- await connection.close();
201
- });
202
-
203
- it('should serialize complex payloads to JSON', async () => {
204
- const testExchange = uniqueExchange();
205
- const connection = new RabbitMQConnection({
206
- url: RABBITMQ_URL,
207
- exchange: testExchange,
208
- });
209
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
210
-
211
- const complexPayload = {
212
- userId: '123',
213
- email: 'test@example.com',
214
- metadata: {
215
- createdAt: new Date().toISOString(),
216
- tags: ['new', 'active'],
217
- nested: {
218
- deep: {
219
- value: true,
220
- },
221
- },
222
- },
223
- };
224
-
225
- await publisher.publish([
226
- { type: 'user.created', payload: complexPayload },
227
- ]);
228
-
229
- await connection.close();
230
- });
231
-
232
- it('should handle large batch of messages', async () => {
233
- const testExchange = uniqueExchange();
234
- const connection = new RabbitMQConnection({
235
- url: RABBITMQ_URL,
236
- exchange: testExchange,
237
- });
238
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
239
-
240
- // Create 100 messages
241
- const messages: TestMessage[] = Array.from({ length: 100 }, (_, i) => ({
242
- type: i % 2 === 0 ? 'user.created' : 'user.updated',
243
- payload: { userId: `user-${i}`, index: i },
244
- }));
245
-
246
- await publisher.publish(messages);
247
- await connection.close();
248
- });
249
-
250
- it('should handle empty array', async () => {
251
- const testExchange = uniqueExchange();
252
- const connection = new RabbitMQConnection({
253
- url: RABBITMQ_URL,
254
- exchange: testExchange,
255
- });
256
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
257
-
258
- await publisher.publish([]);
259
- await connection.close();
260
- });
261
- });
262
-
263
- describe('close', () => {
264
- it('should close connection gracefully', async () => {
265
- const testExchange = uniqueExchange();
266
- const connection = new RabbitMQConnection({
267
- url: RABBITMQ_URL,
268
- exchange: testExchange,
269
- });
270
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
271
-
272
- await publisher.publish([
273
- { type: 'user.created', payload: { userId: 'test' } },
274
- ]);
275
-
276
- await connection.close();
277
- });
278
-
279
- it('should allow reconnection after close', async () => {
280
- const testExchange = uniqueExchange();
281
- const connection = new RabbitMQConnection({
282
- url: RABBITMQ_URL,
283
- exchange: testExchange,
284
- });
285
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
286
-
287
- await publisher.publish([
288
- { type: 'user.created', payload: { userId: '1' } },
289
- ]);
290
-
291
- await connection.close();
292
-
293
- // Should reconnect on next publish
294
- await publisher.publish([
295
- { type: 'user.created', payload: { userId: '2' } },
296
- ]);
297
-
298
- await connection.close();
299
- });
300
-
301
- it('should not throw error if already closed', async () => {
302
- const testExchange = uniqueExchange();
303
- const connection = new RabbitMQConnection({
304
- url: RABBITMQ_URL,
305
- exchange: testExchange,
306
- });
307
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
308
-
309
- await publisher.publish([
310
- { type: 'user.created', payload: { userId: 'test' } },
311
- ]);
312
-
313
- await connection.close();
314
- await expect(connection.close()).resolves.toBeUndefined();
315
- });
316
-
317
- it('should handle close without ever connecting', async () => {
318
- const testExchange = uniqueExchange();
319
- const connection = new RabbitMQConnection({
320
- url: RABBITMQ_URL,
321
- exchange: testExchange,
322
- });
323
- const _publisher = new RabbitMQPublisher<TestMessage>(connection);
324
-
325
- await expect(connection.close()).resolves.toBeUndefined();
326
- });
327
- });
328
-
329
- describe('connection error handling', () => {
330
- it('should throw error for invalid hostname', async () => {
331
- const testExchange = uniqueExchange();
332
- const connection = new RabbitMQConnection({
333
- url: 'amqp://geekmidas:geekmidas@invalid-host:5672',
334
- exchange: testExchange,
335
- timeout: 1000, // Short timeout for faster test
336
- });
337
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
338
-
339
- await expect(
340
- publisher.publish([
341
- { type: 'user.created', payload: { userId: '123' } },
342
- ]),
343
- ).rejects.toThrow();
344
- });
345
-
346
- it('should throw error for invalid credentials', async () => {
347
- const testExchange = uniqueExchange();
348
- const connection = new RabbitMQConnection({
349
- url: 'amqp://wrong:wrong@localhost:5672',
350
- exchange: testExchange,
351
- timeout: 1000, // Short timeout for faster test
352
- });
353
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
354
-
355
- await expect(
356
- publisher.publish([
357
- { type: 'user.created', payload: { userId: '123' } },
358
- ]),
359
- ).rejects.toThrow();
360
- });
361
-
362
- it('should throw error for invalid port', async () => {
363
- const testExchange = uniqueExchange();
364
- const connection = new RabbitMQConnection({
365
- url: 'amqp://geekmidas:geekmidas@localhost:9999',
366
- exchange: testExchange,
367
- timeout: 1000, // Short timeout for faster test
368
- });
369
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
370
-
371
- await expect(
372
- publisher.publish([
373
- { type: 'user.created', payload: { userId: '123' } },
374
- ]),
375
- ).rejects.toThrow();
376
- });
377
- });
378
- });
@@ -1,292 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import type { PublishableMessage } from '../../types';
3
- import { RabbitMQConnection } from '../RabbitMQConnection';
4
- import { RabbitMQPublisher } from '../RabbitMQPublisher';
5
- import { RabbitMQSubscriber } from '../RabbitMQSubscriber';
6
-
7
- type TestMessage = PublishableMessage<'user.created' | 'user.updated', any>;
8
-
9
- const RABBITMQ_URL = 'amqp://geekmidas:geekmidas@localhost:5672';
10
-
11
- // Helper to generate unique exchange names
12
- const uniqueExchange = () =>
13
- `test-exchange-${Date.now()}-${Math.random().toString(36).substring(7)}`;
14
-
15
- describe('RabbitMQSubscriber - Integration Tests', () => {
16
- it('should receive published messages', async () => {
17
- const testExchange = uniqueExchange();
18
- const connection = new RabbitMQConnection({
19
- url: RABBITMQ_URL,
20
- exchange: testExchange,
21
- });
22
- await connection.connect();
23
-
24
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
25
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection);
26
-
27
- const receivedMessages: TestMessage[] = [];
28
-
29
- await subscriber.subscribe(['user.created'], async (message) => {
30
- receivedMessages.push(message);
31
- });
32
-
33
- // Wait a bit for consumer to be ready
34
- await new Promise((resolve) => setTimeout(resolve, 100));
35
-
36
- await publisher.publish([
37
- { type: 'user.created', payload: { userId: '123' } },
38
- ]);
39
-
40
- // Wait for message to be processed
41
- await new Promise((resolve) => setTimeout(resolve, 200));
42
-
43
- expect(receivedMessages).toHaveLength(1);
44
- expect(receivedMessages[0].payload.userId).toBe('123');
45
-
46
- await connection.close();
47
- });
48
-
49
- it('should receive multiple messages', async () => {
50
- const testExchange = uniqueExchange();
51
- const connection = new RabbitMQConnection({
52
- url: RABBITMQ_URL,
53
- exchange: testExchange,
54
- });
55
- await connection.connect();
56
-
57
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
58
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection);
59
-
60
- const receivedMessages: TestMessage[] = [];
61
-
62
- await subscriber.subscribe(['user.created'], async (message) => {
63
- receivedMessages.push(message);
64
- });
65
-
66
- await new Promise((resolve) => setTimeout(resolve, 100));
67
-
68
- await publisher.publish([
69
- { type: 'user.created', payload: { userId: '1' } },
70
- { type: 'user.created', payload: { userId: '2' } },
71
- { type: 'user.created', payload: { userId: '3' } },
72
- ]);
73
-
74
- await new Promise((resolve) => setTimeout(resolve, 300));
75
-
76
- expect(receivedMessages).toHaveLength(3);
77
-
78
- await connection.close();
79
- });
80
-
81
- it('should only receive subscribed message types', async () => {
82
- const testExchange = uniqueExchange();
83
- const connection = new RabbitMQConnection({
84
- url: RABBITMQ_URL,
85
- exchange: testExchange,
86
- });
87
- await connection.connect();
88
-
89
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
90
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection);
91
-
92
- const receivedMessages: TestMessage[] = [];
93
-
94
- // Only subscribe to user.created
95
- await subscriber.subscribe(['user.created'], async (message) => {
96
- receivedMessages.push(message);
97
- });
98
-
99
- await new Promise((resolve) => setTimeout(resolve, 100));
100
-
101
- await publisher.publish([
102
- { type: 'user.created', payload: { userId: '1' } },
103
- { type: 'user.updated', payload: { userId: '2' } },
104
- { type: 'user.created', payload: { userId: '3' } },
105
- ]);
106
-
107
- await new Promise((resolve) => setTimeout(resolve, 300));
108
-
109
- expect(receivedMessages).toHaveLength(2);
110
- expect(receivedMessages.every((m) => m.payload.userId !== '2')).toBe(true);
111
-
112
- await connection.close();
113
- });
114
-
115
- it('should subscribe to multiple message types', async () => {
116
- const testExchange = uniqueExchange();
117
- const connection = new RabbitMQConnection({
118
- url: RABBITMQ_URL,
119
- exchange: testExchange,
120
- });
121
- await connection.connect();
122
-
123
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
124
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection);
125
-
126
- const receivedMessages: TestMessage[] = [];
127
-
128
- await subscriber.subscribe(
129
- ['user.created', 'user.updated'],
130
- async (message) => {
131
- receivedMessages.push(message);
132
- },
133
- );
134
-
135
- await new Promise((resolve) => setTimeout(resolve, 100));
136
-
137
- await publisher.publish([
138
- { type: 'user.created', payload: { userId: '1' } },
139
- { type: 'user.updated', payload: { userId: '2' } },
140
- { type: 'user.created', payload: { userId: '3' } },
141
- ]);
142
-
143
- await new Promise((resolve) => setTimeout(resolve, 300));
144
-
145
- expect(receivedMessages).toHaveLength(3);
146
-
147
- await connection.close();
148
- });
149
-
150
- it('should handle message processing errors with nack', async () => {
151
- const testExchange = uniqueExchange();
152
- const connection = new RabbitMQConnection({
153
- url: RABBITMQ_URL,
154
- exchange: testExchange,
155
- });
156
- await connection.connect();
157
-
158
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
159
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection);
160
-
161
- let processCount = 0;
162
-
163
- await subscriber.subscribe(['user.created'], async (_message) => {
164
- processCount++;
165
- if (processCount === 1) {
166
- // Fail first time
167
- throw new Error('Processing error');
168
- }
169
- // Success on retry
170
- });
171
-
172
- await new Promise((resolve) => setTimeout(resolve, 100));
173
-
174
- await publisher.publish([
175
- { type: 'user.created', payload: { userId: '123' } },
176
- ]);
177
-
178
- // Wait for initial processing and retry
179
- await new Promise((resolve) => setTimeout(resolve, 500));
180
-
181
- // Should have been processed twice (initial + retry after nack)
182
- expect(processCount).toBeGreaterThanOrEqual(2);
183
-
184
- await connection.close();
185
- });
186
-
187
- it('should work with custom queue name', async () => {
188
- const testExchange = uniqueExchange();
189
- const queueName = `test-queue-${Date.now()}`;
190
-
191
- const connection = new RabbitMQConnection({
192
- url: RABBITMQ_URL,
193
- exchange: testExchange,
194
- });
195
- await connection.connect();
196
-
197
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
198
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection, {
199
- queueName,
200
- });
201
-
202
- const receivedMessages: TestMessage[] = [];
203
-
204
- await subscriber.subscribe(['user.created'], async (message) => {
205
- receivedMessages.push(message);
206
- });
207
-
208
- await new Promise((resolve) => setTimeout(resolve, 100));
209
-
210
- await publisher.publish([
211
- { type: 'user.created', payload: { userId: '123' } },
212
- ]);
213
-
214
- await new Promise((resolve) => setTimeout(resolve, 200));
215
-
216
- expect(receivedMessages).toHaveLength(1);
217
-
218
- await connection.close();
219
- });
220
-
221
- it('should work with prefetch limit', async () => {
222
- const testExchange = uniqueExchange();
223
- const connection = new RabbitMQConnection({
224
- url: RABBITMQ_URL,
225
- exchange: testExchange,
226
- });
227
- await connection.connect();
228
-
229
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
230
- const subscriber = new RabbitMQSubscriber<TestMessage>(connection, {
231
- prefetch: 1,
232
- });
233
-
234
- const receivedMessages: TestMessage[] = [];
235
-
236
- await subscriber.subscribe(['user.created'], async (message) => {
237
- receivedMessages.push(message);
238
- // Slow processing
239
- await new Promise((resolve) => setTimeout(resolve, 100));
240
- });
241
-
242
- await new Promise((resolve) => setTimeout(resolve, 100));
243
-
244
- // Publish multiple messages
245
- await publisher.publish([
246
- { type: 'user.created', payload: { userId: '1' } },
247
- { type: 'user.created', payload: { userId: '2' } },
248
- { type: 'user.created', payload: { userId: '3' } },
249
- ]);
250
-
251
- // Wait for all to be processed
252
- await new Promise((resolve) => setTimeout(resolve, 500));
253
-
254
- expect(receivedMessages).toHaveLength(3);
255
-
256
- await connection.close();
257
- });
258
-
259
- it('should work with fromConnectionString', async () => {
260
- const testExchange = uniqueExchange();
261
- const subscriber =
262
- await RabbitMQSubscriber.fromConnectionString<TestMessage>(
263
- `rabbitmq://geekmidas:geekmidas@localhost:5672?exchange=${testExchange}`,
264
- );
265
-
266
- const connection = new RabbitMQConnection({
267
- url: RABBITMQ_URL,
268
- exchange: testExchange,
269
- });
270
- await connection.connect();
271
-
272
- const publisher = new RabbitMQPublisher<TestMessage>(connection);
273
-
274
- const receivedMessages: TestMessage[] = [];
275
-
276
- await subscriber.subscribe(['user.created'], async (message) => {
277
- receivedMessages.push(message);
278
- });
279
-
280
- await new Promise((resolve) => setTimeout(resolve, 100));
281
-
282
- await publisher.publish([
283
- { type: 'user.created', payload: { userId: '123' } },
284
- ]);
285
-
286
- await new Promise((resolve) => setTimeout(resolve, 200));
287
-
288
- expect(receivedMessages).toHaveLength(1);
289
-
290
- await connection.close();
291
- });
292
- });
@@ -1,6 +0,0 @@
1
- export type { RabbitMQConnectionConfig } from './RabbitMQConnection';
2
- export { RabbitMQConnection } from './RabbitMQConnection';
3
- export type { RabbitMQPublisherOptions } from './RabbitMQPublisher';
4
- export { RabbitMQPublisher } from './RabbitMQPublisher';
5
- export type { RabbitMQSubscriberOptions } from './RabbitMQSubscriber';
6
- export { RabbitMQSubscriber } from './RabbitMQSubscriber';