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

Records not created on my mongodb after successful connection has been established with producer #58

Open
jerozeek opened this issue Sep 25, 2024 · 0 comments

Comments

@jerozeek
Copy link

jerozeek commented Sep 25, 2024

(node:4726) [MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning.
at Mongoose.connect (/Users/ezumahjeremiah/Desktop/Builds/convexity/package/indexer/node_modules/.pnpm/mongoose@6.13.3_@aws-sdk+client-sso-oidc@3.658.0_@aws-sdk[email protected]_/node_modules/mongoose/lib/index.js:410:5)
at Database.connect (file:///Users/ezumahjeremiah/Desktop/Builds/convexity/package/indexer/node_modules/.pnpm/@maticnetwork+chain-indexer-framework@1.3.14_@aws-sdk+client-sso-oidc@3.658.0_@aws-sdk+client_e2423eoot5aemuosdt3heyj3wa/node_modules/@maticnetwork/chain-indexer-framework/dist/internal/mongo/database.js:33:33)
at BlockPollerProducer.start (file:///Users/ezumahjeremiah/Desktop/Builds/convexity/package/indexer/node_modules/.pnpm/@maticnetwork+chain-indexer-framework@1.3.14_@aws-sdk+client-sso-oidc@3.658.0_@aws-sdk+client_e2423eoot5aemuosdt3heyj3wa/node_modules/@maticnetwork/chain-indexer-framework/dist/internal/block_producers/block_producer.js:65:29)
at produce (file:///Users/ezumahjeremiah/Desktop/Builds/convexity/package/indexer/node_modules/.pnpm/@maticnetwork+chain-indexer-framework@1.3.14_@aws-sdk+client-sso-oidc@3.658.0_@aws-sdk+client_e2423eoot5aemuosdt3heyj3wa/node_modules/@maticnetwork/chain-indexer-framework/dist/public/kafka/producer/produce.js:50:14)
at file:///Users/ezumahjeremiah/Desktop/Builds/convexity/package/indexer/dist/indexer/producer.js:3:18
at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:482:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
Connection status: true

import { BlockPollerProducer } from "@maticnetwork/chain-indexer-framework/block_producers/block_polling_producer";
import { produce } from "@maticnetwork/chain-indexer-framework/kafka/producer/produce";
import {config} from "../config.js";

const producer = produce<BlockPollerProducer>({
    startBlock: 50689834,
    rpcWsEndpoints: [config.rpcWsEndpoint],
    blockPollingTimeout: 20000,
    topic: config.kafka.topic.rawBlocks,
    maxReOrgDepth: 256,
    maxRetries: 5,
    "bootstrap.servers": config.kafka.brokers.join(','),
    "security.protocol": "plaintext",
    type: config.type,
});

producer.on("blockProducer.fatalError", (error: any) => {
    console.log('error found with connection: '+ error)
    process.exit(1);
});

producer.start().catch((error) => {
    console.error(error);
}).then(() => console.log('Connection status: ', producer.isConnected()))

everything logs fine on my alchemy network log after connection has been established

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant