const acceptPreferred = [topic.contentType, acceptWildcard].filter((x) => x).join(', ');
return Communication._axiosConfig('GET', topic.url, undefined, {}, {
[Enum.Header.Accept]: acceptPreferred,
const acceptPreferred = [topic.contentType, acceptWildcard].filter((x) => x).join(', ');
return Communication._axiosConfig('GET', topic.url, undefined, {}, {
[Enum.Header.Accept]: acceptPreferred,
+ if (response.status === 304) {
+ this.logger.info(_scope, 'content has not changed, per server', logInfoData);
+ await this.db.topicFetchComplete(dbCtx, topicId);
+ return;
+ }
+
const contentHash = Communication.contentHash(response.data, topic.contentHashAlgorithm);
logInfoData.contentHash = contentHash;
if (topic.contentHash === contentHash) {
const contentHash = Communication.contentHash(response.data, topic.contentHashAlgorithm);
logInfoData.contentHash = contentHash;
if (topic.contentHash === contentHash) {
await this.db.transaction(dbCtx, async (txCtx) => {
await this.db.topicSetContent(txCtx, {
await this.db.transaction(dbCtx, async (txCtx) => {
await this.db.topicSetContent(txCtx, {
content: Buffer.from(response.data),
contentHash,
...(contentType && { contentType }),
content: Buffer.from(response.data),
contentHash,
...(contentType && { contentType }),
await this.db.transaction(dbCtx, async (txCtx) => {
await this.db.verificationInsert(txCtx, verification);
await this.db.transaction(dbCtx, async (txCtx) => {
await this.db.verificationInsert(txCtx, verification);
- await this.db.subscriptionDeliveryComplete(txCtx, subscription.callback, subscription.topicId);
+ await this.db.subscriptionDeliveryComplete(txCtx, subscription.callback, subscription.topicId, topic.contentUpdated);
- await this.db.subscriptionDeliveryComplete(dbCtx, subscription.callback, subscription.topicId);
+ await this.db.subscriptionDeliveryComplete(dbCtx, subscription.callback, subscription.topicId, topic.contentUpdated);