Rank 1: Thread
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available.
Whats working:
- Connection via websockets
- Ping-pong in appwrite console
- Ping-pong between my localhost app and the console
- Channels.files() subscription receives wss updates
What's not working:
- tablesdb subscription does not work at all
- (response) => {} is not being called anyway
My setup:
- selfhosted appwrite on backend.mydomain.com
- tanstack-start client
const client = new Client();client .setEndpoint(ENDPOINT) .setProject(PROJECT_ID);export const account = new Account(client);export const tablesDb = new TablesDB(client);export const storage = new Storage(client);export const realtime = new Realtime(client);and for testing realtime I have a window when I can CRUD db entries, and also upload files. This is how i set up realtime for listening to tablesDb:
async function realtimeFn() { const subscription = await realtime.subscribe(Channel.tablesdb(DATABASE).table('genres').row(), response => { console.log(response.timestamp); }); setActiveSub(subscription);}
<button onClick={realtimeFn}>Subscribe</button><button onClick={() => activeSub?.close()}>Unsubscribe</button>