Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update v2.11 branch #1698

Merged
merged 66 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
04149cd
[IMPROVED] Performance of respToken (#1575)
piotrpio Feb 29, 2024
f0712b8
[IMPROVED] Bind Object Store bucket stream when getting object. (#1568)
dmitryabramov-f3 Mar 3, 2024
0d49e3f
[IMPROVED] Bind Streams in Object Store Watchers (#1578)
Jarema Mar 4, 2024
dc20b77
[ADDED] StatusChanged for core and js subscriptions (#1570)
piotrpio Mar 11, 2024
e590ddc
[IMPROVED] Fixed typos in comments (#1581)
paoloteti Mar 12, 2024
0b5cfb5
[IMPROVED] Missing section in jetstream readme ToC (#1557)
piotrpio Mar 12, 2024
9daa647
Release v1.33.1 (#1558)
piotrpio Mar 12, 2024
39af9e7
[IMPROVED] Fetch and FetchBatch for draining and closed subscriptions…
piotrpio Mar 18, 2024
d2ec2df
[FIXED] Incorrect stopErr used
ramonberrutti Mar 18, 2024
4df3a8d
[IMPROVED] Add test checking if client reconnects after jwt expires (…
piotrpio Mar 19, 2024
a8e2d7e
Release v1.34.0 (#1587)
piotrpio Mar 20, 2024
cbca19e
[FIXED] Race condition in Fetch and FetchBatch when using heartbeats …
piotrpio Apr 2, 2024
077c377
[FIXED] Async publish error handling on disconnect (#1592)
piotrpio Apr 2, 2024
53dabbb
Release v1.34.1 (#1602)
piotrpio Apr 3, 2024
f0d626a
[IMPROVED] Add note to readme about backwards compatibility (#1604)
piotrpio Apr 5, 2024
7c3cc6b
[IMPROVED] Documentation for AccountInfo and ErrJetStreamNotEnabled (…
piotrpio Apr 5, 2024
ea1af24
[ADDED] API to read Reply subject from `micro.Request` (#1589)
mcosta74 Apr 9, 2024
863a593
Remove unnecessary allocations from `readMIMEHeader` (#1609)
neilalexander Apr 15, 2024
2b7a450
[FIXED] KV discard policy in jetstream pkg (#1616)
piotrpio Apr 17, 2024
0f7ce69
[FIXED] Add discard policy repair logic in CreateKeyValue (#1617)
piotrpio Apr 18, 2024
0e8ddbc
[FIXED] Validation in jetstream and KV (#1613)
piotrpio Apr 22, 2024
b688af2
[IMPROVED] Example code in jetstream/README.md (#1595)
jnmoyne Apr 22, 2024
9405da3
[FIXED] Call ConnectedCB with RetryOnFailedConnect when initial conn …
piotrpio Apr 22, 2024
d1dcce8
[UPDATED] Added json tags to KeyValueConfig struct to behave consiste…
pricelessrabbit May 16, 2024
bbcf3ae
[IMPROVED] Added documentation for StreamConfig in jsm.go (#1625)
kazmerdome May 16, 2024
f2dceaf
[ADDED] Force reconnect (#1624)
piotrpio May 17, 2024
df6d4dd
Release v1.35.0 (#1632)
piotrpio May 17, 2024
e2c927c
[FIXED] Object Store compatibility tests (#1637)
Jarema May 24, 2024
1dbfbf3
[IMPROVED] Fix MaxAckPending default value comment unit typo (#1639)
agcom May 27, 2024
eae4267
[IMPROVED] Fix typo inconnect (#1638)
agcom May 28, 2024
939bb0a
[FIXED] Set OptStartSeq correctly in OrderedConsumerConfig (#1644)
piotrpio Jun 11, 2024
d2c6d3b
[IMPROVED] Ordered consumer creation and initial config settings (#1645)
piotrpio Jun 13, 2024
706367b
[IMPROVED] Handle error and reset ordered consumer in Messages() (#1646)
piotrpio Jun 13, 2024
6a98036
[FIXED] Remove `ConsumerInfo()` calls in `Consume()` and `Messages()`…
piotrpio Jun 13, 2024
6c3be45
Release v1.36.0 (#1647)
piotrpio Jun 14, 2024
8ce6a84
[IMPROVED] Trim trailing slash if set on server address which causes …
josephwoodward Jul 17, 2024
2c8ed8c
[IMPROVED] JetStream package docs visibility (#1675)
Jarema Jul 22, 2024
5cc6e1b
Deprecate encoded connections (#1674)
piotrpio Jul 23, 2024
c4c5dad
[FIXED] Deadlock when accessing subscriptions map on consumer (#1671)
piotrpio Jul 25, 2024
93a6d1b
Update docker for compatibility tests (#1688)
Jarema Jul 29, 2024
ad0b622
[FIXED] Panic in ordered consumer (#1686)
piotrpio Aug 1, 2024
5efa0f8
Correct README.md formatting (#1692)
patrick-othmer Aug 5, 2024
13fcdc6
[FIXED] Setting deliver policy in Fetch() for OrderedConsumer (#1693)
piotrpio Aug 7, 2024
77cc9aa
[FIXED] Change Fetch client timeout to a higher value (#1689)
piotrpio Aug 12, 2024
ecc563c
[ADDED] CleanupPublisher method for removing internal JetStream subsc…
piotrpio Aug 12, 2024
eca36a3
[ADDED] ConsumeContext.Closed() method for waiting for consume to be …
piotrpio Aug 13, 2024
f3b6df9
Release v1.37.0 (#1697)
piotrpio Aug 13, 2024
575c4b4
[IMPROVEMENT] Added client retry for async publish in legacy JetStrea…
pranavmehta94 Aug 14, 2024
52abeab
Revert "[ADDED] Pause and resume jetstream consumer (#1571)"
piotrpio Aug 15, 2024
81adeb0
[IMPROVED] Fix linter issues (#1700)
piotrpio Aug 16, 2024
606529e
[IMPROVED] Move CI to github actions (#1623)
piotrpio Sep 5, 2024
0307cd2
[IMPROVED] Use errors.New instead of fmt.Errorf where possible (#1707)
canack Sep 19, 2024
9c04321
[ADDED] UserInfoHandler for dynamically setting user/password (#1713)
piotrpio Sep 20, 2024
096fa7f
[IMPROVED] Remove travis from ci and fix build badge (#1716)
piotrpio Sep 20, 2024
2c0d38b
[FIXED] Invalid response schema in README for Service API (#1720)
piotrpio Sep 24, 2024
0653a74
[IMPROVED] Correct the description of CreateStream to indicate it is …
jnmoyne Oct 3, 2024
aeb7c7f
[IMPROVED] Automate updating dependencies report (#1660)
Jarema Oct 3, 2024
84dbd44
[IMPROVED] Mention TTL in the Update function (#1727)
fmontorsi-equinix Oct 18, 2024
08ae14b
[FIXED] Closing connection on max subscriptions exceeded (#1709)
piotrpio Oct 18, 2024
a3c413a
[FIXED] Publish async not closing done and stall channels after faile…
piotrpio Nov 18, 2024
0179ee6
[FIXED] Invalid fetch sequence in ordered consumer Fetch and Next aft…
piotrpio Nov 18, 2024
05a0589
[ADDED] WatchFiltered method on KV (#1739)
piotrpio Nov 21, 2024
ee79a84
[FIXED] Do not overwrite ordered consumer deliver policy if start tim…
piotrpio Nov 29, 2024
1a2847d
[IMPROVED] Update installation commands (#1745)
alexbozhenko Dec 5, 2024
cbc8c41
[ADDED] Pause and resume jetstream consumer (#1571)
yordis Mar 15, 2024
84608cc
Update server version for tests
piotrpio Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[IMPROVED] Performance of respToken (#1575)
Signed-off-by: Piotr Piotrowski <[email protected]>
  • Loading branch information
piotrpio committed Dec 13, 2024
commit 04149cd62d70a4c48b387044d74c14bb5214e0ff
14 changes: 5 additions & 9 deletions nats.go
Original file line number Diff line number Diff line change
@@ -566,7 +566,6 @@ type Conn struct {
respSub string // The wildcard subject
respSubPrefix string // the wildcard prefix including trailing .
respSubLen int // the length of the wildcard prefix excluding trailing .
respScanf string // The scanf template to extract mux token
respMux *Subscription // A single response subscription
respMap map[string]chan *Msg // Request map for the response msg channels
respRand *rand.Rand // Used for generating suffix
@@ -3938,7 +3937,6 @@ func (nc *Conn) createNewRequestAndSend(subj string, hdr, data []byte) (chan *Ms
nc.mu.Unlock()
return nil, token, err
}
nc.respScanf = strings.Replace(nc.respSub, "*", "%s", -1)
nc.respMux = s
}
nc.mu.Unlock()
@@ -4119,16 +4117,14 @@ func (nc *Conn) NewRespInbox() string {
}

// respToken will return the last token of a literal response inbox
// which we use for the message channel lookup. This needs to do a
// scan to protect itself against the server changing the subject.
// which we use for the message channel lookup. This needs to verify the subject
// prefix matches to protect itself against the server changing the subject.
// Lock should be held.
func (nc *Conn) respToken(respInbox string) string {
var token string
n, err := fmt.Sscanf(respInbox, nc.respScanf, &token)
if err != nil || n != 1 {
return ""
if token, found := strings.CutPrefix(respInbox, nc.respSubPrefix); found {
return token
}
return token
return ""
}

// Subscribe will express interest in the given subject. The subject